From 4b491157f9d0f9329e10385701bb6103f105ab9d Mon Sep 17 00:00:00 2001 From: "jaeseung.bae" Date: Fri, 3 May 2024 16:46:30 +0900 Subject: [PATCH] fix: --- x/fswap/keeper/proposal.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x/fswap/keeper/proposal.go b/x/fswap/keeper/proposal.go index 7ebb8a8df9..e9eb99dc23 100644 --- a/x/fswap/keeper/proposal.go +++ b/x/fswap/keeper/proposal.go @@ -14,7 +14,7 @@ func (k Keeper) MakeSwap(ctx sdk.Context, swap types.Swap, toDenomMetadata bank. return err } if int(stats.SwapCount) >= k.config.MaxSwaps && !k.isUnlimited() { - return types.ErrCanNotHaveMoreSwap.Wrapf("cannot initialize genesis state, there are more than %d swaps", k.config.MaxSwaps) + return types.ErrCanNotHaveMoreSwap.Wrapf("cannot make more swaps, max swaps is %d", k.config.MaxSwaps) } isNewSwap := true if _, err := k.getSwap(ctx, swap.FromDenom, swap.ToDenom); err == nil { @@ -47,8 +47,7 @@ func (k Keeper) MakeSwap(ctx sdk.Context, swap types.Swap, toDenomMetadata bank. } } - err := k.setSwap(ctx, swap) - if err != nil { + if err := k.setSwap(ctx, swap); err != nil { return err }