Skip to content

Commit

Permalink
fix: uniswap v3 token fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Lu committed Jan 15, 2025
1 parent f94b293 commit 2b4c77a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/logics/uniswap-v3/logic.swap-token.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FeeAmount, computePoolAddress } from '@uniswap/v3-sdk';
import { Token } from '@uniswap/sdk-core';
import { TokenList } from '@uniswap/token-lists';
import { axios } from 'src/utils';
import * as common from '@protocolink/common';
import * as core from '@protocolink/core';
import { getConfig, supportedChainIds } from './configs';
Expand Down Expand Up @@ -29,7 +28,8 @@ export class SwapTokenLogic
}

async getTokenList() {
const { data } = await axios.get<TokenList>('https://gateway.ipfs.io/ipns/tokens.uniswap.org');
const response = await fetch('https://gateway.ipfs.io/ipns/tokens.uniswap.org', { method: 'GET' });
const data: TokenList = await response.json();

const tmp: Record<string, boolean> = { [this.nativeToken.address]: true };
const tokenList: SwapTokenLogicTokenList = [this.nativeToken];
Expand Down

0 comments on commit 2b4c77a

Please sign in to comment.