handle edge case of uninitialized lockedUsers.Users

master
michael 2022-09-09 00:05:55 +00:00
parent 25df2fbd0a
commit 953e402ad3
1 changed files with 1 additions and 1 deletions

View File

@ -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{},