Skip to content

Commit 4e0404f

Browse files
hanszhoouJack-Worksguanbinrui
authored
chore: token list domain (#5234)
* chore: token list domain * Update packages/mask/src/extension/background-script/EthereumServices/tokenList.ts Co-authored-by: guanbinrui <[email protected]> * Update packages/web3-constants/evm/ethereum.json Co-authored-by: guanbinrui <[email protected]> * Update packages/web3-constants/evm/ethereum.json Co-authored-by: guanbinrui <[email protected]> * Update packages/web3-constants/evm/ethereum.json Co-authored-by: guanbinrui <[email protected]> * chore: update url * chore: little fix Co-authored-by: Jack Works <[email protected]> Co-authored-by: guanbinrui <[email protected]>
1 parent 92539c1 commit 4e0404f

File tree

2 files changed

+16
-33
lines changed

2 files changed

+16
-33
lines changed
Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,22 @@
11
{
22
"ERC20": {
3-
"Mainnet": [
4-
"https://api.1inch.exchange/v3.0/1/tokens",
5-
"https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/1/tokens.json"
6-
],
7-
"Ropsten": ["https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/3/tokens.json"],
8-
"Rinkeby": ["https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/4/tokens.json"],
3+
"Mainnet": ["https://tokens.r2d2.to/latest/1/tokens.json"],
4+
"Ropsten": ["https://tokens.r2d2.to/latest/3/tokens.json"],
5+
"Rinkeby": ["https://tokens.r2d2.to/latest/4/tokens.json"],
96
"Kovan": ["https://irhonin.github.io/kovan-token-list/kovan-token-list.json"],
107
"Gorli": [],
11-
"BSC": [
12-
"https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/56/tokens.json",
13-
"https://api.1inch.exchange/v3.0/56/tokens"
14-
],
15-
"BSCT": ["https://dimensiondev.github.io/Mask-Token-List/mask.json"],
16-
"Matic": [
17-
"https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/137/tokens.json",
18-
"https://api.1inch.exchange/v3.0/137/tokens"
19-
],
20-
"Mumbai": ["https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/80001/tokens.json"],
21-
"Arbitrum": [
22-
"https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/42161/tokens.json"
23-
],
24-
"Arbitrum_Rinkeby": [
25-
"https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/421611/tokens.json"
26-
],
27-
"xDai": ["https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/100/tokens.json"],
28-
"Avalanche": [
29-
"https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/43114/tokens.json"
30-
],
8+
"BSC": ["https://tokens.r2d2.to/latest/56/tokens.json"],
9+
"BSCT": ["https://tokens.r2d2.to/latest/97/tokens.json"],
10+
"Matic": ["https://tokens.r2d2.to/latest/137/tokens.json"],
11+
"Mumbai": ["https://tokens.r2d2.to/latest/80001/tokens.json"],
12+
"Arbitrum": ["https://tokens.r2d2.to/latest/42161/tokens.json"],
13+
"Arbitrum_Rinkeby": ["https://tokens.r2d2.to/latest/421611/tokens.json"],
14+
"xDai": ["https://tokens.r2d2.to/latest/100/tokens.json"],
15+
"Avalanche": ["https://tokens.r2d2.to/latest/43114/tokens.json"],
3116
"Avalanche_Fuji": [],
32-
"Celo": ["https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/42220/tokens.json"],
33-
"Fantom": ["https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/250/tokens.json"],
34-
"Aurora": [
35-
"https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/1313161554/tokens.json"
36-
],
37-
"Aurora_Testnet": ""
17+
"Celo": ["https://tokens.r2d2.to/latest/42220/tokens.json"],
18+
"Fantom": ["https://tokens.r2d2.to/latest/250/tokens.json"],
19+
"Aurora": ["https://tokens.r2d2.to/latest/1313161554/tokens.json"],
20+
"Aurora_Testnet": []
3821
}
3922
}

packages/web3-providers/src/token-list/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async function fetchERC20TokensFromTokenList(urls: string[], chainId = ChainId.M
7777
}
7878

7979
const tokens = await fetchCommonERC20TokensFromTokenList(x, chainId)
80-
return { tokens, weight: x.includes('Mask-Token-List') ? 1 : 0 }
80+
return { tokens, weight: x.startsWith('https://tokens.r2d2.to') ? 1 : 0 }
8181
})
8282

8383
const allListResponse = await Promise.allSettled(allRequest)

0 commit comments

Comments
 (0)