From 3d09bfd85911e417a8e1fdf3d4417f59d8a46ab6 Mon Sep 17 00:00:00 2001 From: ezreal1997 Date: Wed, 18 Dec 2024 16:27:18 +0100 Subject: [PATCH] chores(*): api and error codes --- client/x/evmstaking/keeper/deposit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/x/evmstaking/keeper/deposit.go b/client/x/evmstaking/keeper/deposit.go index 728a921d..e12074ef 100644 --- a/client/x/evmstaking/keeper/deposit.go +++ b/client/x/evmstaking/keeper/deposit.go @@ -159,7 +159,7 @@ func (k Keeper) ProcessDeposit(ctx context.Context, ev *bindings.IPTokenStakingD depositorAddr.String(), validatorAddr.String(), amountCoin, delID, periodType, ) - if _, err := skeeperMsgServer.Delegate(cachedCtx, msg); errors.Is(err, stypes.ErrDelegationBelowMinimum) { + if _, err = skeeperMsgServer.Delegate(cachedCtx, msg); errors.Is(err, stypes.ErrDelegationBelowMinimum) { return errors.WrapErrWithCode(errors.InvalidDelegationAmount, err) } else if errors.Is(err, stypes.ErrNoPeriodTypeFound) { return errors.WrapErrWithCode(errors.InvalidPeriodType, err)