add some unmarshal panics

This commit is contained in:
rigelrozanski 2018-03-03 21:03:34 +00:00
parent fb199e293e
commit 9349d95cd9
2 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,9 @@ func GetParseAccount(cdc *wire.Codec) sdk.ParseAccount {
return func(accBytes []byte) (res sdk.Account, err error) {
acct := new(AppAccount)
err = cdc.UnmarshalBinary(accBytes, &acct)
if err != nil {
panic(err)
}
return acct, err
}
}

View File

@ -23,6 +23,9 @@ func getParseAccount(cdc *wire.Codec) sdk.ParseAccount {
return func(accBytes []byte) (sdk.Account, error) {
acct := new(auth.BaseAccount)
err := cdc.UnmarshalBinary(accBytes, acct)
if err != nil {
panic(err)
}
return acct, err
}
}