fix: retain permit validity for lesser amounts (#3580)
This commit is contained in:
parent
7a215ccdb4
commit
f1bcee3c08
@ -174,7 +174,8 @@ export function useERC20Permit(
|
|||||||
signatureData.tokenAddress === tokenAddress &&
|
signatureData.tokenAddress === tokenAddress &&
|
||||||
signatureData.nonce === nonceNumber &&
|
signatureData.nonce === nonceNumber &&
|
||||||
signatureData.spender === spender &&
|
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 {
|
return {
|
||||||
state: isSignatureDataValid ? UseERC20PermitState.SIGNED : UseERC20PermitState.NOT_SIGNED,
|
state: isSignatureDataValid ? UseERC20PermitState.SIGNED : UseERC20PermitState.NOT_SIGNED,
|
||||||
|
Loading…
Reference in New Issue
Block a user