From 9b639bee650306c4b667530c76849720aa46411a Mon Sep 17 00:00:00 2001 From: Moody Salem Date: Fri, 30 Apr 2021 21:23:16 -0500 Subject: [PATCH] invalidate signature data for old nonce --- src/hooks/useERC20Permit.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hooks/useERC20Permit.ts b/src/hooks/useERC20Permit.ts index d8dacfecea..4c543aa1ba 100644 --- a/src/hooks/useERC20Permit.ts +++ b/src/hooks/useERC20Permit.ts @@ -169,6 +169,7 @@ export function useERC20Permit( signatureData.owner === account && signatureData.deadline >= transactionDeadline.toNumber() && signatureData.tokenAddress === tokenAddress && + signatureData.nonce === nonceNumber && signatureData.spender === spender && ('allowed' in signatureData || JSBI.equal(JSBI.BigInt(signatureData.amount), currencyAmount.raw))