Merge PR #5668: Fix GetAccountWithHeight

This commit is contained in:
Alexander Bezobchuk
2020-02-18 16:53:11 +01:00
committed by GitHub
parent a63de303b8
commit 1736692f3b
+3 -3
View File
@@ -48,12 +48,12 @@ func (ar AccountRetriever) GetAccountWithHeight(addr sdk.AccAddress) (exported.A
return nil, height, err
}
acc, err := ar.codec.UnmarshalAccountJSON(bz)
if err != nil {
var account exported.Account
if err := ar.codec.UnmarshalJSON(bz, &account); err != nil {
return nil, height, err
}
return acc, height, nil
return account, height, nil
}
// EnsureExists returns an error if no account exists for the given address else nil.