Commit f1bcee3c authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

fix: retain permit validity for lesser amounts (#3580)

parent 7a215ccd
......@@ -174,7 +174,8 @@ export function useERC20Permit(
signatureData.tokenAddress === tokenAddress &&
signatureData.nonce === nonceNumber &&
signatureData.spender === spender &&
('allowed' in signatureData || JSBI.equal(JSBI.BigInt(signatureData.amount), currencyAmount.quotient))
('allowed' in signatureData ||
JSBI.greaterThanOrEqual(JSBI.BigInt(signatureData.amount), currencyAmount.quotient))
return {
state: isSignatureDataValid ? UseERC20PermitState.SIGNED : UseERC20PermitState.NOT_SIGNED,
......
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