handle edge case of uninitialized lockedUsers.Users
parent
25df2fbd0a
commit
953e402ad3
|
@ -20,7 +20,7 @@ func (k msgServer) LockFunds(goCtx context.Context, msg *types.MsgLockFunds) (*t
|
||||||
}
|
}
|
||||||
|
|
||||||
lockedUsers, found := k.Keeper.GetLockedUsers(ctx)
|
lockedUsers, found := k.Keeper.GetLockedUsers(ctx)
|
||||||
if !found {
|
if !found || lockedUsers.Users == nil {
|
||||||
// initialize if not yet initialized
|
// initialize if not yet initialized
|
||||||
lockedUsers = types.LockedUsers{
|
lockedUsers = types.LockedUsers{
|
||||||
Users: map[string]string{},
|
Users: map[string]string{},
|
||||||
|
|
Loading…
Reference in New Issue