Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeseung-bae committed May 3, 2024
1 parent c0950b6 commit 4b49115
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions x/fswap/keeper/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 4b49115

Please sign in to comment.