Skip to content

Commit

Permalink
converted ether to token
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzschoff committed Jan 27, 2022
1 parent 4a2dd58 commit 48216f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/queries/src/queries/misc/useTokenListQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ import { useQuery, UseQueryOptions } from 'react-query';
import axios from 'axios';
import keyBy from 'lodash/keyBy';

import { TokenListQueryResponse, TokenListResponse } from '../../types';
import { Token, TokenListQueryResponse, TokenListResponse } from '../../types';
import { CryptoCurrency, ETH_ADDRESS } from '../../currency';
import { QueryContext } from '../../context';
import { NetworkIdByName } from '@synthetixio/contracts-interface';

const ether = {
address: ETH_ADDRESS,
chainId: 1,
chainId: NetworkIdByName.mainnet,
decimals: 18,
logoURI: '',
name: 'Ethereum',
symbol: CryptoCurrency.ETH,
tags: [],
};
} as Token;

const useTokenListQuery = (
_: QueryContext,
Expand All @@ -25,7 +26,6 @@ const useTokenListQuery = (
['misc', 'tokenList', tokenListUrl],
async () => {
const response = await axios.get<TokenListResponse>(tokenListUrl);

const tokens = [ether, ...response.data.tokens];

return {
Expand Down

0 comments on commit 48216f6

Please sign in to comment.