-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEAT: Allow cancel inactive limit orders #711
base: main
Are you sure you want to change the base?
Conversation
Please attach a succesfull testrun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rest LGTM
x/dex/keeper/cancel_limit_order.go
Outdated
@@ -59,20 +59,20 @@ 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.ErrActiveLimitOrderNotFound | |||
return sdk.Coin{}, sdk.Coin{}, nil, types.ErrValidLimitOrderTrancheNotFound |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to the error definition, it's a wrapped error supposed to be here, isn't it? Here and at the line 75. Just like below at the line 88
Allow inactive limit orders to be canceled instead of withdrawn.
This new behavior has 2 benefits.
related PRs
neutron-org/neutron-integration-tests#355