-
Notifications
You must be signed in to change notification settings - Fork 320
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
pcli: support multiple lp withdrawals #5070
Conversation
@@ -747,7 +747,7 @@ impl ViewService for ViewServer { | |||
tonic::Status::invalid_argument(format!("Could not parse pair: {e:#}")) | |||
})?; | |||
|
|||
planner.position_withdraw(position_id, reserves, trading_pair); | |||
planner.position_withdraw(position_id, reserves, trading_pair, 0); |
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.
Why is this being 0 ok? Wouldn't we want to follow the planning request?
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.
This is kind of a fake TPR implementation, unlike the one in Prax. It's not used by the regular pcli commands, I think an integration test uses it maybe. Making it work here is possible but low ROI, so I opted for not doing anything
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.
Sounds good ; we could maybe add a comment to that effect
466394b
to
ae2300b
Compare
3b003fa
to
595789f
Compare
We're not currently exercising the multiple-withdraw behavior in the integration tests, but we'll be exercising these code paths a lot toward LQT support (#5010). |
## Describe your changes Now we can use `pcli tx withdraw <id>` to withdraw a position multiple times, increasing its sequence. We fetch the reserves on every try so that the balance commitment is always accurate. To view the output, use `pcli v balance --by-note` this is unfortunate but wontfix now. ## Issue ticket number and link #5069 ## Checklist before requesting a review - [ ] I have added guiding text to explain how a reviewer should test these changes. - [ ] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > REPLACE THIS TEXT WITH RATIONALE (CAN BE BRIEF) --------- Co-authored-by: Lucas Meier <[email protected]>
## Describe your changes Now we can use `pcli tx withdraw <id>` to withdraw a position multiple times, increasing its sequence. We fetch the reserves on every try so that the balance commitment is always accurate. To view the output, use `pcli v balance --by-note` this is unfortunate but wontfix now. ## Issue ticket number and link #5069 ## Checklist before requesting a review - [ ] I have added guiding text to explain how a reviewer should test these changes. - [ ] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > REPLACE THIS TEXT WITH RATIONALE (CAN BE BRIEF) --------- Co-authored-by: Lucas Meier <[email protected]>
Describe your changes
Now we can use
pcli tx withdraw <id>
to withdraw a position multiple times, increasing its sequence. We fetch the reserves on every try so that the balance commitment is always accurate.To view the output, use
pcli v balance --by-note
this is unfortunate but wontfix now.Issue ticket number and link
#5069
Checklist before requesting a review
I have added guiding text to explain how a reviewer should test these changes.
If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: