Skip to content
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

Open
wants to merge 1 commit into
base: protocol/lqt_branch
Choose a base branch
from

Conversation

erwanor
Copy link
Member

@erwanor erwanor commented Feb 6, 2025

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)

@@ -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);
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants