Skip to content

Commit ee1577a

Browse files
committed
swap with aave collateral approval not using eip712
1 parent 4a49a88 commit ee1577a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/store/poolSlice.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import {
4141
LPSupplyParamsType,
4242
LPSupplyWithPermitType,
4343
} from '@aave/contract-helpers/dist/esm/v3-pool-contract/lendingPoolTypes';
44-
import { AaveSafetyModule, AaveV3Ethereum } from '@bgd-labs/aave-address-book';
44+
import { AaveV3Ethereum } from '@bgd-labs/aave-address-book';
4545
import { BigNumber, PopulatedTransaction, Signature, utils } from 'ethers';
4646
import { splitSignature } from 'ethers/lib/utils';
4747
import { ClaimRewardsActionsProps } from 'src/components/transactions/ClaimRewards/ClaimRewardsActions';
@@ -713,17 +713,13 @@ export const createPoolSlice: StateCreator<
713713
},
714714
},
715715
generateSignatureRequest: async ({ token, amount, deadline, spender }, opts = {}) => {
716-
const v3Tokens = [
717-
AaveV3Ethereum.ASSETS.AAVE.UNDERLYING.toLowerCase(),
718-
AaveV3Ethereum.ASSETS.AAVE.A_TOKEN.toLowerCase(),
719-
AaveSafetyModule.STK_AAVE.toLowerCase(),
720-
];
716+
const v3TokensWithEip712DomainSupport = [AaveV3Ethereum.ASSETS.AAVE.UNDERLYING.toLowerCase()];
721717

722718
const provider = get().jsonRpcProvider(opts.chainId);
723719

724720
let name = '';
725721
let version = '1';
726-
if (v3Tokens.includes(token.toLowerCase())) {
722+
if (v3TokensWithEip712DomainSupport.includes(token.toLowerCase())) {
727723
const aaveV3TokenService = new AaveTokenV3Service(token, provider);
728724
const domain = await aaveV3TokenService.getEip712Domain();
729725
name = domain.name;

0 commit comments

Comments
 (0)