Commit 719ee0f5 authored by eddie's avatar eddie Committed by GitHub

fix: loosen permit2 expiration tolerance in e2e tests (#6573)

parent 75bdf9a8
...@@ -51,9 +51,9 @@ describe('Permit2', () => { ...@@ -51,9 +51,9 @@ describe('Permit2', () => {
.then((hardhat) => hardhat.approval.getPermit2Allowance({ owner: hardhat.wallet, token: INPUT_TOKEN })) .then((hardhat) => hardhat.approval.getPermit2Allowance({ owner: hardhat.wallet, token: INPUT_TOKEN }))
.then((allowance) => { .then((allowance) => {
cy.wrap(MaxUint160.eq(allowance.amount)).should('eq', true) cy.wrap(MaxUint160.eq(allowance.amount)).should('eq', true)
// Asserts that the on-chain expiration is in 30 days, within a tolerance of 20 seconds. // Asserts that the on-chain expiration is in 30 days, within a tolerance of 40 seconds.
const expected = Math.floor((approvalTime + 2_592_000_000) / 1000) const expected = Math.floor((approvalTime + 2_592_000_000) / 1000)
cy.wrap(allowance.expiration).should('be.closeTo', expected, 20) cy.wrap(allowance.expiration).should('be.closeTo', expected, 40)
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment