Skip to content

Commit

Permalink
switch to wrapped error
Browse files Browse the repository at this point in the history
  • Loading branch information
jcompagni10 committed Sep 19, 2024
1 parent bb920da commit c00327b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/dex/keeper/cancel_limit_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (k Keeper) ExecuteCancelLimitOrder(
) (makerCoinOut, takerCoinOut sdk.Coin, tradePairID *types.TradePairID, error error) {
trancheUser, found := k.GetLimitOrderTrancheUser(ctx, callerAddr.String(), trancheKey)
if !found {
return sdk.Coin{}, sdk.Coin{}, nil, types.ErrValidLimitOrderTrancheNotFound
return sdk.Coin{}, sdk.Coin{}, nil, sdkerrors.Wrapf(types.ErrValidLimitOrderTrancheNotFound, "%s", trancheKey)
}

tradePairID, tickIndex := trancheUser.TradePairId, trancheUser.TickIndexTakerToMaker
Expand All @@ -72,7 +72,7 @@ func (k Keeper) ExecuteCancelLimitOrder(
},
)
if !found {
return sdk.Coin{}, sdk.Coin{}, nil, types.ErrValidLimitOrderTrancheNotFound
return sdk.Coin{}, sdk.Coin{}, nil, sdkerrors.Wrapf(types.ErrValidLimitOrderTrancheNotFound, "%s", trancheKey)
}

makerAmountToReturn := tranche.RemoveTokenIn(trancheUser)
Expand Down

0 comments on commit c00327b

Please sign in to comment.