return 0 bal when user not in locked funds store

master
michael 2022-09-09 00:07:33 +00:00
parent 953e402ad3
commit 8976bfa8a7
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ func (k Keeper) LockedFunds(goCtx context.Context, req *types.QueryLockedFundsRe
var userAmtStr string
userAmtStr, ok = lockedUsers.Users[req.Owner]
if !ok {
return nil, fmt.Errorf("user %s has not locked any funds", req.Owner)
// doesn't exist in dict -> 0 funds locked
userAmtStr = "0"
// return nil, fmt.Errorf("user %s has not locked any funds", req.Owner)
}
return &types.QueryLockedFundsResponse{