Skip to content

Commit 5f5a55d

Browse files
committed
nit
1 parent d811670 commit 5f5a55d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/usdtHelpers.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { valueToBigNumber } from '@aave/math-utils';
2+
13
/**
24
* Check if a token is USDT on Ethereum that requires approval reset
35
* @param tokenSymbol - The token symbol
@@ -25,9 +27,8 @@ export const needsUSDTApprovalReset = (
2527
isUSDTOnEthereum(tokenSymbol, chainId) &&
2628
Boolean(currentApproval) &&
2729
Boolean(newApproval) &&
28-
currentApproval !== '-1' &&
29-
currentApproval !== '0' &&
30-
BigInt(currentApproval) < BigInt(newApproval)
30+
valueToBigNumber(currentApproval).isGreaterThan(0) &&
31+
valueToBigNumber(currentApproval).isLessThan(valueToBigNumber(newApproval))
3132
);
3233
};
3334

0 commit comments

Comments
 (0)