We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d811670 commit 5f5a55dCopy full SHA for 5f5a55d
src/utils/usdtHelpers.ts
@@ -1,3 +1,5 @@
1
+import { valueToBigNumber } from '@aave/math-utils';
2
+
3
/**
4
* Check if a token is USDT on Ethereum that requires approval reset
5
* @param tokenSymbol - The token symbol
@@ -25,9 +27,8 @@ export const needsUSDTApprovalReset = (
25
27
isUSDTOnEthereum(tokenSymbol, chainId) &&
26
28
Boolean(currentApproval) &&
29
Boolean(newApproval) &&
- currentApproval !== '-1' &&
- currentApproval !== '0' &&
30
- BigInt(currentApproval) < BigInt(newApproval)
+ valueToBigNumber(currentApproval).isGreaterThan(0) &&
31
+ valueToBigNumber(currentApproval).isLessThan(valueToBigNumber(newApproval))
32
);
33
};
34
0 commit comments