Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
0afeb5ac
Unverified
Commit
0afeb5ac
authored
Aug 31, 2021
by
Jordan Frankfurt
Committed by
GitHub
Aug 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add arbitrum token list (#2268)
parent
9e8d08e2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
lists.ts
src/constants/lists.ts
+2
-0
updater.ts
src/state/lists/updater.ts
+4
-1
No files found.
src/constants/lists.ts
View file @
0afeb5ac
...
...
@@ -7,6 +7,7 @@ const CMC_STABLECOIN = 'stablecoin.cmc.eth'
const
COINGECKO_LIST
=
'
https://tokens.coingecko.com/uniswap/all.json
'
const
COMPOUND_LIST
=
'
https://raw.githubusercontent.com/compound-finance/token-list/master/compound.tokenlist.json
'
const
GEMINI_LIST
=
'
https://www.gemini.com/uniswap/manifest.json
'
export
const
ARBITRUM_LIST
=
'
https://bridge.arbitrum.io/token-list-42161.json
'
const
KLEROS_LIST
=
'
t2crtokens.eth
'
export
const
OPTIMISM_LIST
=
'
https://static.optimism.io/optimism.tokenlist.json
'
const
ROLL_LIST
=
'
https://app.tryroll.com/tokens.json
'
...
...
@@ -27,6 +28,7 @@ export const DEFAULT_LIST_OF_LISTS: string[] = [
ROLL_LIST
,
COINGECKO_LIST
,
KLEROS_LIST
,
ARBITRUM_LIST
,
OPTIMISM_LIST
,
GEMINI_LIST
,
...
UNSUPPORTED_LIST_URLS
,
// need to load unsupported tokens as well
...
...
src/state/lists/updater.ts
View file @
0afeb5ac
import
{
getVersionUpgrade
,
minVersionBump
,
VersionUpgrade
}
from
'
@uniswap/token-lists
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
OPTIMISM_LIST
,
UNSUPPORTED_LIST_URLS
}
from
'
constants/lists
'
import
{
ARBITRUM_LIST
,
OPTIMISM_LIST
,
UNSUPPORTED_LIST_URLS
}
from
'
constants/lists
'
import
{
useCallback
,
useEffect
}
from
'
react
'
import
{
useAppDispatch
}
from
'
state/hooks
'
import
{
useAllLists
}
from
'
state/lists/hooks
'
...
...
@@ -32,6 +32,9 @@ export default function Updater(): null {
if
(
chainId
&&
[
SupportedChainId
.
OPTIMISM
,
SupportedChainId
.
OPTIMISTIC_KOVAN
].
includes
(
chainId
))
{
dispatch
(
enableList
(
OPTIMISM_LIST
))
}
if
(
chainId
&&
[
SupportedChainId
.
ARBITRUM_ONE
,
SupportedChainId
.
ARBITRUM_RINKEBY
].
includes
(
chainId
))
{
dispatch
(
enableList
(
ARBITRUM_LIST
))
}
},
[
chainId
,
dispatch
])
// fetch all lists every 10 minutes, but only after we initialize library
useInterval
(
fetchAllListsCallback
,
library
?
1000
*
60
*
10
:
null
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment