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
4078390a
Unverified
Commit
4078390a
authored
Jul 23, 2021
by
Ian Lapham
Committed by
GitHub
Jul 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update unsupported and broken lists (#2100)
parent
e07599ef
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1079 additions
and
5 deletions
+1079
-5
lists.ts
src/constants/lists.ts
+0
-2
broken.tokenlist.json
src/constants/tokenLists/broken.tokenlist.json
+22
-0
unsupported.tokenlist.json
src/constants/tokenLists/unsupported.tokenlist.json
+1050
-0
hooks.ts
src/state/lists/hooks.ts
+7
-3
No files found.
src/constants/lists.ts
View file @
4078390a
...
@@ -11,7 +11,6 @@ const KLEROS_LIST = 't2crtokens.eth'
...
@@ -11,7 +11,6 @@ const KLEROS_LIST = 't2crtokens.eth'
export
const
OPTIMISM_LIST
=
'
https://static.optimism.io/optimism.tokenlist.json
'
export
const
OPTIMISM_LIST
=
'
https://static.optimism.io/optimism.tokenlist.json
'
const
ROLL_LIST
=
'
https://app.tryroll.com/tokens.json
'
const
ROLL_LIST
=
'
https://app.tryroll.com/tokens.json
'
const
SET_LIST
=
'
https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/main/set.tokenlist.json
'
const
SET_LIST
=
'
https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/main/set.tokenlist.json
'
const
UMA_LIST
=
'
https://umaproject.org/uma.tokenlist.json
'
const
WRAPPED_LIST
=
'
wrapped.tokensoft.eth
'
const
WRAPPED_LIST
=
'
wrapped.tokensoft.eth
'
// only load blocked list if on app url
// only load blocked list if on app url
...
@@ -23,7 +22,6 @@ export const DEFAULT_LIST_OF_LISTS: string[] = [
...
@@ -23,7 +22,6 @@ export const DEFAULT_LIST_OF_LISTS: string[] = [
AAVE_LIST
,
AAVE_LIST
,
CMC_ALL_LIST
,
CMC_ALL_LIST
,
CMC_STABLECOIN
,
CMC_STABLECOIN
,
UMA_LIST
,
WRAPPED_LIST
,
WRAPPED_LIST
,
SET_LIST
,
SET_LIST
,
ROLL_LIST
,
ROLL_LIST
,
...
...
src/constants/tokenLists/
uniswap-v2-unsupported
.tokenlist.json
→
src/constants/tokenLists/
broken
.tokenlist.json
View file @
4078390a
{
{
"name"
:
"
Unsupported Tokens
"
,
"name"
:
"
Broken Token List
"
,
"timestamp"
:
"2021-01-05T20:47:02.923Z"
,
"timestamp"
:
"2021-01-05T20:47:02.923Z"
,
"version"
:
{
"version"
:
{
"major"
:
1
,
"major"
:
1
,
...
@@ -8,24 +8,8 @@
...
@@ -8,24 +8,8 @@
},
},
"tags"
:
{},
"tags"
:
{},
"logoURI"
:
"ipfs://QmNa8mQkrNKp1WEEeGjFezDmDeodkWRevGFN8JCV7b4Xir"
,
"logoURI"
:
"ipfs://QmNa8mQkrNKp1WEEeGjFezDmDeodkWRevGFN8JCV7b4Xir"
,
"keywords"
:
[
"uniswap"
,
"
unsupported
"
],
"keywords"
:
[
"uniswap"
,
"
broken
"
],
"tokens"
:
[
"tokens"
:
[
{
"name"
:
"Gold Tether"
,
"address"
:
"0x4922a015c4407F87432B179bb209e125432E4a2A"
,
"symbol"
:
"XAUt"
,
"decimals"
:
6
,
"chainId"
:
1
,
"logoURI"
:
"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x4922a015c4407F87432B179bb209e125432E4a2A/logo.png"
},
{
"name"
:
"Grump Cat"
,
"address"
:
"0x93B2FfF814FCaEFFB01406e80B4Ecd89Ca6A021b"
,
"symbol"
:
"GRUMPY"
,
"decimals"
:
9
,
"chainId"
:
1
,
"logoURI"
:
"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x4922a015c4407F87432B179bb209e125432E4a2A/logo.png"
},
{
{
"name"
:
"UNI HODL"
,
"name"
:
"UNI HODL"
,
"address"
:
"0x4bf5dc91E2555449293D7824028Eb8Fe5879B689"
,
"address"
:
"0x4bf5dc91E2555449293D7824028Eb8Fe5879B689"
,
...
...
src/constants/tokenLists/unsupported.tokenlist.json
0 → 100644
View file @
4078390a
This diff is collapsed.
Click to expand it.
src/state/lists/hooks.ts
View file @
4078390a
...
@@ -4,7 +4,8 @@ import { IS_ON_APP_URL } from 'constants/misc'
...
@@ -4,7 +4,8 @@ import { IS_ON_APP_URL } from 'constants/misc'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
useAppSelector
}
from
'
state/hooks
'
import
{
useAppSelector
}
from
'
state/hooks
'
import
sortByListPriority
from
'
utils/listSort
'
import
sortByListPriority
from
'
utils/listSort
'
import
UNSUPPORTED_TOKEN_LIST
from
'
../../constants/tokenLists/uniswap-v2-unsupported.tokenlist.json
'
import
UNSUPPORTED_TOKEN_LIST
from
'
../../constants/tokenLists/unsupported.tokenlist.json
'
import
BROKEN_LIST
from
'
../../constants/tokenLists/broken.tokenlist.json
'
import
{
AppState
}
from
'
../index
'
import
{
AppState
}
from
'
../index
'
import
{
UNSUPPORTED_LIST_URLS
}
from
'
./../../constants/lists
'
import
{
UNSUPPORTED_LIST_URLS
}
from
'
./../../constants/lists
'
import
{
WrappedTokenInfo
}
from
'
./wrappedTokenInfo
'
import
{
WrappedTokenInfo
}
from
'
./wrappedTokenInfo
'
...
@@ -119,13 +120,16 @@ export function useUnsupportedTokenList(): TokenAddressMap {
...
@@ -119,13 +120,16 @@ export function useUnsupportedTokenList(): TokenAddressMap {
// get hard coded unsupported tokens, only block on app url
// get hard coded unsupported tokens, only block on app url
const
localUnsupportedListMap
=
useMemo
(()
=>
(
IS_ON_APP_URL
?
listToTokenMap
(
UNSUPPORTED_TOKEN_LIST
)
:
{}),
[])
const
localUnsupportedListMap
=
useMemo
(()
=>
(
IS_ON_APP_URL
?
listToTokenMap
(
UNSUPPORTED_TOKEN_LIST
)
:
{}),
[])
// broken tokens, blocked on all URLS
const
brokenListMap
=
useMemo
(()
=>
listToTokenMap
(
BROKEN_LIST
),
[])
// get any loaded unsupported tokens, this will be empty if not on app URL
// get any loaded unsupported tokens, this will be empty if not on app URL
const
loadedUnsupportedListMap
=
useCombinedTokenMapFromUrls
(
UNSUPPORTED_LIST_URLS
)
const
loadedUnsupportedListMap
=
useCombinedTokenMapFromUrls
(
UNSUPPORTED_LIST_URLS
)
// format into one token address map
// format into one token address map
return
useMemo
(
return
useMemo
(
()
=>
combineMaps
(
localUnsupportedListMap
,
loadedUnsupportedListMap
),
()
=>
combineMaps
(
brokenListMap
,
combineMaps
(
localUnsupportedListMap
,
loadedUnsupportedListMap
)
),
[
localUnsupportedListMap
,
loadedUnsupportedListMap
]
[
localUnsupportedListMap
,
loadedUnsupportedListMap
,
brokenListMap
]
)
)
}
}
...
...
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