From 07ec89037212bce6a3e604a1ebaabc292ea4742c Mon Sep 17 00:00:00 2001 From: yutianwu Date: Wed, 24 Apr 2019 15:12:21 +0800 Subject: [PATCH] Revert "[R4R] fix insufficient coins error msg" --- x/bank/keeper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/bank/keeper.go b/x/bank/keeper.go index fe48a2b1c..2ba5d8721 100644 --- a/x/bank/keeper.go +++ b/x/bank/keeper.go @@ -187,7 +187,7 @@ func subtractCoins(ctx sdk.Context, am auth.AccountKeeper, addr sdk.AccAddress, oldCoins := getCoins(ctx, am, addr) newCoins := oldCoins.Minus(amt) if !newCoins.IsNotNegative() { - return amt, nil, sdk.ErrInsufficientCoins(fmt.Sprintf("%s are less than %s", oldCoins, amt)) + return amt, nil, sdk.ErrInsufficientCoins(fmt.Sprintf("%s < %s", oldCoins, amt)) } err := setCoins(ctx, am, addr, newCoins) tags := sdk.NewTags("sender", []byte(addr.String())) @@ -199,7 +199,7 @@ func addCoins(ctx sdk.Context, am auth.AccountKeeper, addr sdk.AccAddress, amt s oldCoins := getCoins(ctx, am, addr) newCoins := oldCoins.Plus(amt) if !newCoins.IsNotNegative() { - return amt, nil, sdk.ErrInsufficientCoins(fmt.Sprintf("%s are less than %s", oldCoins, amt)) + return amt, nil, sdk.ErrInsufficientCoins(fmt.Sprintf("%s < %s", oldCoins, amt)) } err := setCoins(ctx, am, addr, newCoins) tags := sdk.NewTags("recipient", []byte(addr.String()))