Skip to content

Commit

Permalink
add BTC, LUX, ZOO token to pre-tab
Browse files Browse the repository at this point in the history
  • Loading branch information
foxier25 committed Nov 23, 2024
1 parent 87dafd1 commit 579d86d
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/constants/lists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const WRAPPED_LIST = 'wrapped.tokensoft.eth'
export const OPTIMISM_LIST = 'https://static.optimism.io/optimism.tokenlist.json'
export const ARBITRUM_LIST = 'https://bridge.arbitrum.io/token-list-42161.json'
export const CELO_LIST = 'https://celo-org.github.io/celo-token-list/celo.tokenlist.json'
export const LUX_LIST = 'tokens-lux'
// export const LUX_LIST = 'https://cdn.lux.network/exchange/tokens-lux/tokens.json'
// export const LUX_LIST = 'tokens-lux'
export const LUX_LIST = 'https://cdn.lux.network/exchange/tokens-lux/tokens.json'

export const UNSUPPORTED_LIST_URLS: string[] = [BA_LIST, UNI_UNSUPPORTED_LIST]

Expand Down
8 changes: 8 additions & 0 deletions src/constants/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ import {
USDT_ARBITRUM_ONE,
LETH,
LUSD,
LBTC,
LZOO,
ZBTC,
ZLUX,
USDT_LUX_TESTNET,
USDC_LUX_TESTNET,
ZETH,
Expand Down Expand Up @@ -193,13 +197,17 @@ export const COMMON_BASES: ChainCurrencyList = {
],
[SupportedChainId.LUX]: [
nativeOnChain(SupportedChainId.LUX),
LBTC,
LETH,
LUSD,
LZOO,
],
[SupportedChainId.ZOO]: [
nativeOnChain(SupportedChainId.ZOO),
ZBTC,
ZETH,
ZUSD,
ZLUX,
],
[SupportedChainId.LUX_TESTNET]: [
nativeOnChain(SupportedChainId.LUX_TESTNET),
Expand Down
32 changes: 32 additions & 0 deletions src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ export const LUSD = new Token(
"Lux Dollar",
);

export const LBTC = new Token(
SupportedChainId.LUX,
'0x1E48D32a4F5e9f08DB9aE4959163300FaF8A6C8e',
18,
"LBTC",
"Lux BTC",
);

export const LZOO = new Token(
SupportedChainId.LUX,
'0x5E5290f350352768bD2bfC59c2DA15DD04A7cB88',
18,
"LZOO",
"Lux ZOO",
);

export const ZETH = new Token(
SupportedChainId.ZOO,
'0x60E0a8167FC13dE89348978860466C9ceC24B9ba',
Expand All @@ -41,6 +57,22 @@ export const ZETH = new Token(
"Zoo ETH",
);

export const ZBTC = new Token(
SupportedChainId.ZOO,
'0x1E48D32a4F5e9f08DB9aE4959163300FaF8A6C8e',
18,
"ZBTC",
"Zoo BTC",
);

export const ZLUX = new Token(
SupportedChainId.ZOO,
'0x5E5290f350352768bD2bfC59c2DA15DD04A7cB88',
18,
"ZLUX",
"Zoo LUX",
);

export const USDC_LUX_TESTNET = new Token(
SupportedChainId.LUX_TESTNET,
'0x8031e9b0D02a792cfEFaa2bDCA6E1289d385426F',
Expand Down
10 changes: 5 additions & 5 deletions src/hooks/useFetchListCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import getTokenList from 'lib/hooks/useTokenList/fetchTokenList'
import resolveENSContentHash from 'lib/utils/resolveENSContentHash'
import { useCallback } from 'react'
import { useAppDispatch } from 'state/hooks'
import { TOKENS_LUX_LIST } from 'tokens-lux/tokens'
// import { TOKENS_LUX_LIST } from 'tokens-lux/tokens'

import { fetchTokenList } from '../state/lists/actions'

Expand All @@ -22,10 +22,10 @@ export function useFetchListCallback(): (
async (listUrl: string, sendDispatch = true, skipValidation?: boolean) => {
const requestId = nanoid()
sendDispatch && dispatch(fetchTokenList.pending({ requestId, url: listUrl }))
if(listUrl === "tokens-lux") {
dispatch(fetchTokenList.fulfilled({ url: listUrl, tokenList: TOKENS_LUX_LIST, requestId }));
return TOKENS_LUX_LIST;
}
// if(listUrl === "tokens-lux") {
// dispatch(fetchTokenList.fulfilled({ url: listUrl, tokenList: TOKENS_LUX_LIST, requestId }));
// return TOKENS_LUX_LIST;
// }
return getTokenList(
listUrl,
(ensName: string) => resolveENSContentHash(ensName, RPC_PROVIDERS[SupportedChainId.MAINNET]),
Expand Down

0 comments on commit 579d86d

Please sign in to comment.