mirror of
https://github.com/colinear-labs/chain.git
synced 2026-03-05 03:04:25 -08:00
return 0 bal when user not in locked funds store
This commit is contained in:
@@ -31,7 +31,9 @@ func (k Keeper) LockedFunds(goCtx context.Context, req *types.QueryLockedFundsRe
|
|||||||
var userAmtStr string
|
var userAmtStr string
|
||||||
userAmtStr, ok = lockedUsers.Users[req.Owner]
|
userAmtStr, ok = lockedUsers.Users[req.Owner]
|
||||||
if !ok {
|
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{
|
return &types.QueryLockedFundsResponse{
|
||||||
|
|||||||
Reference in New Issue
Block a user