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

VAL-132 Allow cancellation of full requested balance #173

Merged
merged 3 commits into from
Feb 8, 2023
Merged

VAL-132 Allow cancellation of full requested balance #173

merged 3 commits into from
Feb 8, 2023

Conversation

ams9198
Copy link
Contributor

@ams9198 ams9198 commented Feb 8, 2023

The first commit adds a failing test, with a comment, demonstrating how a full requestedBalance can't be zeroed out. 2nd commit adds the fix.

Previously, maxRequestCancellation would return total requested and eligible balance MINUS fees applied against that total. Then, when canceling, the fees would be burned, and then canceled amount would be subtracted from your requestedBalance. With fee > 0, this is always strictly less than your total requested balance, preventing a full cancel.

With this change, maxRequestCancellation just returns the requested balance.

@ams9198 ams9198 merged commit 027ecfa into circlefin:master Feb 8, 2023
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