-
Notifications
You must be signed in to change notification settings - Fork 19
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-138 Inconsistent global withdraw state after cancellation #178
Conversation
uint256 cancelledShares | ||
) public pure returns (IPoolWithdrawState memory updatedState) { | ||
updatedState = progressWithdrawState(state, currentPeriod); |
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.
My read was that this call was duplicative, since in the WithdrawController just prior we call _currentWithdrawState()
, which in turn calls progressWithdrawState
: https://github.com/circlefin/valyria-core/blob/027ecfa98067cc1801e63b9e55c1faca030a7947/contracts/controllers/WithdrawController.sol#L80
Let me know if your understanding is different.
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.
It does seem duplicative.
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 was actually a lot cleaner than I expected it to be.
uint256 cancelledShares | ||
) public pure returns (IPoolWithdrawState memory updatedState) { | ||
updatedState = progressWithdrawState(state, currentPeriod); |
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.
It does seem duplicative.
The first commit adds a failing test case demonstrating the issue.
I find implementation to be slightly awkward; open to feedback on any improvements!