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-138 Inconsistent global withdraw state after cancellation #178

Merged
merged 4 commits into from
Feb 14, 2023
Merged

VAL-138 Inconsistent global withdraw state after cancellation #178

merged 4 commits into from
Feb 14, 2023

Conversation

ams9198
Copy link
Contributor

@ams9198 ams9198 commented Feb 10, 2023

The first commit adds a failing test case demonstrating the issue.

I find implementation to be slightly awkward; open to feedback on any improvements!

uint256 cancelledShares
) public pure returns (IPoolWithdrawState memory updatedState) {
updatedState = progressWithdrawState(state, currentPeriod);
Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does seem duplicative.

venables
venables previously approved these changes Feb 13, 2023
Copy link
Contributor

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does seem duplicative.

@ams9198 ams9198 merged commit 18f71fb into circlefin:master Feb 14, 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.

3 participants