Skip to content

Commit 6910df9

Browse files
committed
update LETH and LUSD icons and added token lists
1 parent b0d56a5 commit 6910df9

File tree

8 files changed

+135
-114
lines changed

8 files changed

+135
-114
lines changed

src/components/SearchModal/CurrencySearch.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function CurrencySearch({
101101
// If there is no query, filter out unselected user-added tokens with no balance.
102102
if (!debouncedQuery && token instanceof UserAddedToken) {
103103
if (selectedCurrency?.equals(token) || otherSelectedCurrency?.equals(token)) return true
104-
return balances[token.address]?.greaterThan(0)
104+
// return balances[token.address]?.greaterThan(0)
105105
}
106106
return true
107107
})

src/constants/lists.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ const KLEROS_LIST = 't2crtokens.eth'
1111
const ROLL_LIST = 'https://app.tryroll.com/tokens.json'
1212
const SET_LIST = 'https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/main/set.tokenlist.json'
1313
const WRAPPED_LIST = 'wrapped.tokensoft.eth'
14-
const LUX_LIST = "tokens-lux";
1514

1615
export const OPTIMISM_LIST = 'https://static.optimism.io/optimism.tokenlist.json'
1716
export const ARBITRUM_LIST = 'https://bridge.arbitrum.io/token-list-42161.json'
1817
export const CELO_LIST = 'https://celo-org.github.io/celo-token-list/celo.tokenlist.json'
18+
export const LUX_LIST = 'tokens-lux'
1919

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

src/constants/routing.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import {
3131
USDC_POLYGON,
3232
USDT,
3333
USDT_ARBITRUM_ONE,
34-
USDT_LUX,
35-
USDC_LUX,
34+
LETH,
35+
LUSD,
3636
USDT_LUX_TESTNET,
3737
USDC_LUX_TESTNET,
3838
USDT_OPTIMISM,
@@ -191,8 +191,8 @@ export const COMMON_BASES: ChainCurrencyList = {
191191
],
192192
[SupportedChainId.LUX]: [
193193
nativeOnChain(SupportedChainId.LUX),
194-
USDT_LUX,
195-
USDC_LUX,
194+
LETH,
195+
LUSD,
196196
],
197197
[SupportedChainId.LUX_TESTNET]: [
198198
nativeOnChain(SupportedChainId.LUX_TESTNET),

src/constants/tokens.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ const USDC_ROPSTEN = new Token(
2525
'USDC',
2626
'USD//C'
2727
)
28-
export const USDC_LUX = new Token(
28+
export const LUSD = new Token(
2929
SupportedChainId.LUX,
30-
'0x57A22965AdA0e52D785A9Aa155beF423D573b879',
30+
'0x42b733cA4b3A8FC0237dBE39A47441cfD525f0F1',
3131
18,
32-
"USDC",
33-
"USD Coin",
32+
"LUSD",
33+
"Lux Dollar",
3434
);
3535

3636
export const USDC_LUX_TESTNET = new Token(
@@ -147,12 +147,12 @@ export const USDT_POLYGON = new Token(
147147
'USDT',
148148
'Tether USD'
149149
)
150-
export const USDT_LUX = new Token(
150+
export const LETH = new Token(
151151
SupportedChainId.LUX,
152-
'0xd25F88CBdAe3c2CCA3Bb75FC4E723b44C0Ea362F',
152+
'0x2951A9386df11a4EA8ae5A823B94DC257dEb35Cb',
153153
18,
154-
"USDT",
155-
"LUX USDT",
154+
"LETH",
155+
"Lux ETH",
156156
);
157157
export const USDT_LUX_TESTNET = new Token(
158158
SupportedChainId.LUX_TESTNET,
@@ -534,7 +534,7 @@ export const TOKEN_SHORTHANDS: { [shorthand: string]: { [chainId in SupportedCha
534534
[SupportedChainId.RINKEBY]: USDC_RINKEBY.address,
535535
[SupportedChainId.KOVAN]: USDC_KOVAN.address,
536536
[SupportedChainId.ROPSTEN]: USDC_ROPSTEN.address,
537-
[SupportedChainId.LUX]: USDC_LUX.address,
537+
// [SupportedChainId.LUX]: LUSD.address,
538538
[SupportedChainId.LUX_TESTNET]: USDC_LUX_TESTNET.address,
539539
},
540540
}

src/graphql/data/util.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const URL_CHAIN_PARAM_TO_BACKEND: { [key: string]: Chain } = {
8080
celo: Chain.Celo,
8181
arbitrum: Chain.Arbitrum,
8282
optimism: Chain.Optimism,
83+
lux: Chain.Lux,
8384
}
8485

8586
export function validateUrlChainParam(chainName: string | undefined) {
@@ -92,9 +93,10 @@ export const CHAIN_NAME_TO_CHAIN_ID: { [key: string]: SupportedChainId } = {
9293
CELO: SupportedChainId.CELO,
9394
ARBITRUM: SupportedChainId.ARBITRUM_ONE,
9495
OPTIMISM: SupportedChainId.OPTIMISM,
96+
LUX: SupportedChainId.LUX,
9597
}
9698

97-
export const BACKEND_CHAIN_NAMES: Chain[] = [Chain.Ethereum, Chain.Polygon, Chain.Optimism, Chain.Arbitrum, Chain.Celo]
99+
export const BACKEND_CHAIN_NAMES: Chain[] = [Chain.Ethereum, Chain.Polygon, Chain.Optimism, Chain.Arbitrum, Chain.Celo, Chain.Lux]
98100

99101
export function getTokenDetailsURL(address: string, chainName?: Chain, chainId?: number) {
100102
if (address === ZERO_ADDRESS && chainId && chainId === SupportedChainId.MAINNET) {

src/hooks/useFetchListCallback.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import getTokenList from 'lib/hooks/useTokenList/fetchTokenList'
66
import resolveENSContentHash from 'lib/utils/resolveENSContentHash'
77
import { useCallback } from 'react'
88
import { useAppDispatch } from 'state/hooks'
9-
import { TOKENS_LUX_LIST } from 'tokens-lux/tokens'
9+
import TOKENS_LUX_LIST from 'tokens-lux/tokens.json';
1010

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

src/tokens-lux/tokens.json

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"name": "Lux extended list",
3+
"timestamp": "2024-10-01T19:32:51.793Z",
4+
"version": {
5+
"major": 10,
6+
"minor": 0,
7+
"patch": 0
8+
},
9+
"tags": {},
10+
"logoURI": "ipfs://QmNa8mQkrNKp1WEEeGjFezDmDeodkWRevGFN8JCV7b4Xir",
11+
"keywords": [
12+
"lux",
13+
"extended"
14+
],
15+
"tokens": [
16+
{
17+
"chainId": 7777,
18+
"address": "0xd4b2F0435faca8959A7D2e096C2A3Ce9697Ee9fc",
19+
"name": "Wrapped LUX",
20+
"symbol": "WLUX",
21+
"decimals": 18,
22+
"logoURI": "https://cdn.lux.network/exchange/icon-png/lux.png",
23+
"extensions": {}
24+
},
25+
{
26+
"chainId": 7777,
27+
"address": "0x2951A9386df11a4EA8ae5A823B94DC257dEb35Cb",
28+
"name": "Lux ETH",
29+
"symbol": "LETH",
30+
"decimals": 18,
31+
"logoURI": "https://cdn.lux.network/exchange/icon-png/leth.png",
32+
"extensions": {}
33+
},
34+
{
35+
"chainId": 7777,
36+
"address": "0x42b733cA4b3A8FC0237dBE39A47441cfD525f0F1",
37+
"name": "Lux Dollar",
38+
"symbol": "LUSD",
39+
"decimals": 18,
40+
"logoURI": "https://cdn.lux.network/exchange/icon-png/lusd.png",
41+
"extensions": {}
42+
},
43+
{
44+
"chainId": 8888,
45+
"address": "0xA01c406bC54aD9363704E9D26522a4629b5E6263",
46+
"name": "Wrapped LUX",
47+
"symbol": "WLUX",
48+
"decimals": 18,
49+
"logoURI": "https://cdn.lux.network/exchange/icon-png/lux.png",
50+
"extensions": {}
51+
},
52+
{
53+
"chainId": 8888,
54+
"address": "0x5670756808b32c209a25c67481ba9c3c710126bb",
55+
"name": "Lux ETH",
56+
"symbol": "LETH",
57+
"decimals": 18,
58+
"logoURI": "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
59+
"extensions": {}
60+
},
61+
{
62+
"chainId": 8888,
63+
"address": "0x5fc1f8394a0dfb43d21a03be5656559c45690357",
64+
"name": "Lux XDAI",
65+
"symbol": "LXDAI",
66+
"decimals": 18,
67+
"logoURI": "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
68+
"extensions": {}
69+
},
70+
{
71+
"chainId": 8888,
72+
"address": "0xa1eeefb7693760e78501b29fcec9fb03ca981d3d",
73+
"name": "Lux POL",
74+
"symbol": "LPOL",
75+
"decimals": 18,
76+
"logoURI": "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
77+
"extensions": {}
78+
},
79+
{
80+
"chainId": 8888,
81+
"address": "0xcec718c5b0c538cc6c15c151b9dc0f714499eab6",
82+
"name": "Lux BNB",
83+
"symbol": "LBNB",
84+
"decimals": 18,
85+
"logoURI": "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
86+
"extensions": {}
87+
},
88+
{
89+
"chainId": 8888,
90+
"address": "0xe5c2a45ce63addf0f9581a439c85a214db657813",
91+
"name": "Lux FTM",
92+
"symbol": "LFTM",
93+
"decimals": 18,
94+
"logoURI": "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
95+
"extensions": {}
96+
},
97+
{
98+
"chainId": 8888,
99+
"address": "0x7e1007b013dcf1d4d49b8ebfdf0c07b7683d4637",
100+
"name": "Lux CELO",
101+
"symbol": "LCELO",
102+
"decimals": 18,
103+
"logoURI": "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
104+
"extensions": {}
105+
},
106+
{
107+
"chainId": 8888,
108+
"address": "0xb84112ac9318a0b2319aa11d4d10e9762b25f7f4",
109+
"name": "Lux USD",
110+
"symbol": "LUSD",
111+
"decimals": 18,
112+
"logoURI": "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
113+
"extensions": {}
114+
}
115+
]
116+
}

src/tokens-lux/tokens.ts

-97
This file was deleted.

0 commit comments

Comments
 (0)