-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: partial payouts for cancelled requests #561
Conversation
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.
Nice, thanks!
Looks like the newly added test is failing on CI.
ead24a4
to
13ae69a
Compare
13ae69a
to
6aed1b6
Compare
I have added the verification of the truly canceled state and also the termination of canceled requests in cancelled states (both in purchasing and sales). |
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.
Nicely done @AuHau!
d0831f4
to
049dd76
Compare
049dd76
to
4b375ec
Compare
Adds support for partial payouts of canceled requests.
Also closes #556 and fixes off-by-one bug for calling
withdrawFunds()
contract function for canceled requests which leads to errors "Request is not expired yet".The integration test is failing, though, because of the Hardhat's mining mode - automine. The time needs to be advanced (eq. mined block) before calling the
withdrawFunds()
function for the canceled request, but I have not figured out any way how to do it in the test's code. I have tried switching the Hardhat's mining mode into mining block every second and for that the test worked. Maybe we should consider changing the mining mode? It had brought us more problems recently 😳The PR is blocked by the contract's PR: codex-storage/codex-contracts-eth#69
Also closes codex-storage/codex-contracts-eth#57