handle edge case of uninitialized lockedUsers.Users

This commit is contained in:
2022-09-09 00:05:55 +00:00
parent 25df2fbd0a
commit 953e402ad3

View File

@@ -20,7 +20,7 @@ func (k msgServer) LockFunds(goCtx context.Context, msg *types.MsgLockFunds) (*t
}
lockedUsers, found := k.Keeper.GetLockedUsers(ctx)
if !found {
if !found || lockedUsers.Users == nil {
// initialize if not yet initialized
lockedUsers = types.LockedUsers{
Users: map[string]string{},