-
Notifications
You must be signed in to change notification settings - Fork 66
Test: Add Cover YieldTokenIncidents claim integration tests #547
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
Test: Add Cover YieldTokenIncidents claim integration tests #547
Conversation
0ec6010
to
3ee311e
Compare
[chainlinkDAI.address, chainlinkSteth.address], | ||
[18, 18], | ||
[dai.address, stETH.address, usdc.address], | ||
[chainlinkDAI.address, chainlinkSteth.address, chainlinkUSDC.address], |
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.
good integration test addition for USDC to test different decimals basically
|
||
const { period, gracePeriod, priceDenominator } = submitClaimFixture; | ||
|
||
const amount = parseUnits('10', 6); |
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.
const usdcDecimals = 6
}); | ||
|
||
// submit incident | ||
await submitIncident({ gv, yc, productId, period, priceBefore: parseUnits('1', 6) }); |
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.
const usdcDecimals
yc.connect(coverBuyer1).redeemPayout(0, 0, 0, parseEther('1'), nonMember1.address, [], { gasPrice: 0 }), | ||
).to.be.revertedWith('The incident needs to be accepted'); | ||
const usdcBalanceBefore = await usdc.balanceOf(nonMember1.address); | ||
await yc.connect(coverBuyer1).redeemPayout(0, 0, 0, parseUnits('1', 6), nonMember1.address, []); |
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.
const usdcDecimals all over there's a few more places
This looks good, just a few minor things but they are not critical @patitonar |
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 work
Context
Closes #326
Changes proposed in this pull request
Adds new integration tests for the process of submitting a claim and redeeming the payout.
Test plan
New tests were added in
test/integration/YieldTokenIncidents/submitClaim.js
Checklist
Review
When reviewing a PR, please indicate intention in comments using the following emojis: