Skip to content

Commit

Permalink
edit getAccount to stay in line with initial cosmos sdk contract, ie …
Browse files Browse the repository at this point in the history
…return nil when address is nil instead of panic
  • Loading branch information
randy75828 committed Dec 27, 2022
1 parent 9733ed3 commit 84e120b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/auth/keeper/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ func (ak AccountKeeper) IsModuleAccount(ctx sdk.Context, addr sdk.AccAddress) bo

// GetAccount implements AccountKeeperI.
func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI {
if addr == nil {
return nil
}
store := ctx.KVStore(ak.key)
bz := store.Get(types.AddressStoreKey(addr))
if bz == nil {
Expand Down

0 comments on commit 84e120b

Please sign in to comment.