mirror of
https://github.com/colinear-labs/chain.git
synced 2026-03-04 22:14:25 -08:00
handle edge case of uninitialized lockedUsers.Users
This commit is contained in:
@@ -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{},
|
||||||
|
|||||||
Reference in New Issue
Block a user