-
Notifications
You must be signed in to change notification settings - Fork 16
Cancel withdrawal #131
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
base: master
Are you sure you want to change the base?
Cancel withdrawal #131
Conversation
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
require(batchIndex > $.finalizedWithdrawalBatch, WithdrawalAlreadyFinalized()); | ||
|
||
uint256 pufETHAmount = withdrawal.pufETHAmount; | ||
address recipient = withdrawal.recipient; |
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.
Since we're using withdrawal.recipient in some checks before this line, we could declare this first and use the local variable instead
Withdrawal memory withdrawal = $.withdrawals[withdrawalIdx]; | ||
|
||
// Check if withdrawal has already been completed (recipient is set to address(0) when completed) | ||
require(withdrawal.recipient != address(0), WithdrawalAlreadyCompleted()); |
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.
Is this necessary since we're already checking if the withdrawal is finalized?
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.
Disregard comment. This is useful to prevent cancelling the same withdrawal twice
The actual coverage of the contract is |
No description provided.