-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix auto-closing orders withdrawal #282
Conversation
JasonMHasperhoven
commented
Jan 16, 2025
•
edited
Loading
edited
- Addresses Fix batch withdrawal to work with auto-closing positions #241
- And splits positions into multiple files for better maintenance
* display alternative gas fee metadata * use react query * cleanup
prevState?.state === PositionState_PositionStateEnum.OPENED && | ||
nextState?.state === PositionState_PositionStateEnum.CLOSED, | ||
) | ||
.map(({ positionId }) => positionId); |
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.
👍
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.
LGTM, can merge on resolving conflicts
few questions cc @erwanor
Screen.Recording.2025-01-16.at.7.24.15.PM.mov
Screen.Recording.2025-01-16.at.7.24.25.PM.mov |
Batch withdrawals can fail for approximately two reasons:
This PR fixes 1), and leaves 2) for later. It will be easy to solve 2) when we get to the beta because we will have made changes to the view service, beginning with penumbra-zone/penumbra#4992 This PR is called "Fix batch withdrawal" but it should rather be named, fix auto-closing orders withdrawal. |
(added a conflict-resolution commit) |
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.
Seems good ; I think it would've been simpler to just close all positions, eliminating the need to thread the state around, but this works fine as well, and can save on gas.