Chains with whitelist, extend checks to Binance and few others. (#3129)

Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
This commit is contained in:
Adam R 2020-08-07 15:21:11 +02:00 committed by GitHub
parent 484c63ddeb
commit c84831f089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 11 deletions

View File

@ -1,8 +1,8 @@
[ [
"AWC-8B2", "AWC-8B2",
"BOLT-762",
"BCPT-645", "BCPT-645",
"BNB",
"BOLT-762",
"USDS.B-c27", "USDS.B-c27",
"WITH-E50", "WITH-E50"
"BNB"
] ]

View File

@ -1,26 +1,33 @@
[ [
"ABCD-5D8",
"AERGO-46B", "AERGO-46B",
"ZEBI-84F", "ALA-DCD",
"ANKR-E97", "ANKR-E97",
"ARN-71B", "ARN-71B",
"ARPA-575", "ARPA-575",
"ART-3C9", "ART-3C9",
"ATP-38C",
"AVA-645", "AVA-645",
"AWC-986", "AWC-986",
"AXPR-777", "AXPR-777",
"BAW-DFB", "BAW-DFB",
"BCH-1FD", "BCH-1FD",
"BCPT-95A", "BCPT-95A",
"BEAR-14C",
"BET-844", "BET-844",
"BETX-A0C", "BETX-A0C",
"BGBP-CF3", "BGBP-CF3",
"BHC-3E8M",
"BHFT-BBE", "BHFT-BBE",
"BIDR-0E9",
"BKBT-3A6", "BKBT-3A6",
"BKRW-AB7",
"BLINK-9C6", "BLINK-9C6",
"BOLT-4C6", "BOLT-4C6",
"BST2-2F2", "BST2-2F2",
"BTCB-1DE", "BTCB-1DE",
"BTTB-D31", "BTTB-D31",
"BULL-BE4",
"BUSD-BD1", "BUSD-BD1",
"BZNT-464", "BZNT-464",
"CAN-677", "CAN-677",
@ -34,6 +41,7 @@
"COVA-218", "COVA-218",
"CRPT-8C9", "CRPT-8C9",
"CSM-734", "CSM-734",
"DARC-24B",
"DEEP-9D3", "DEEP-9D3",
"DEFI-FA5", "DEFI-FA5",
"DOS-120", "DOS-120",
@ -43,9 +51,14 @@
"ECO-083", "ECO-083",
"EET-45C", "EET-45C",
"ENTRP-C8D", "ENTRP-C8D",
"EOS-CDD",
"EOSBEAR-721",
"EOSBULL-F0D",
"EQL-586", "EQL-586",
"ERD-D06", "ERD-D06",
"ETH-1C9", "ETH-1C9",
"ETHBEAR-B2B",
"ETHBULL-D33",
"EVT-49B", "EVT-49B",
"FRM-DE7", "FRM-DE7",
"FSN-E14", "FSN-E14",
@ -63,9 +76,10 @@
"KAVA-10C", "KAVA-10C",
"LBA-340", "LBA-340",
"LIT-099", "LIT-099",
"ALA-DCD", "LOKI-6A9",
"LTC-F07", "LTC-F07",
"LTO-BDF", "LTO-BDF",
"LYFE-6AB",
"MATIC-84A", "MATIC-84A",
"MCASH-869", "MCASH-869",
"MDAB-D42", "MDAB-D42",
@ -80,10 +94,12 @@
"NEW-09E", "NEW-09E",
"NEXO-A84", "NEXO-A84",
"NODE-F3A", "NODE-F3A",
"NOIZB-878",
"NOW-E68", "NOW-E68",
"NPXB-1E8", "NPXB-1E8",
"NPXSXEM-89C", "NPXSXEM-89C",
"ONE-5F9", "ONE-5F9",
"ONT-33D",
"OWTX-A6B", "OWTX-A6B",
"PCAT-4BB", "PCAT-4BB",
"PHB-2DF", "PHB-2DF",
@ -94,11 +110,14 @@
"PYN-C37", "PYN-C37",
"QBX-38C", "QBX-38C",
"RAVEN-F66", "RAVEN-F66",
"RNO-14E",
"RUNE-B1A", "RUNE-B1A",
"SBC-5D4",
"SHR-DB6", "SHR-DB6",
"SLV-986", "SLV-986",
"SPNDB-916", "SPNDB-916",
"STYL-65B", "STYL-65B",
"SWINGBY-888",
"SWIPE.B-DC0", "SWIPE.B-DC0",
"TAUDB-888", "TAUDB-888",
"TCADB-888", "TCADB-888",
@ -111,6 +130,7 @@
"TRUE-D84", "TRUE-D84",
"TRXB-2E6", "TRXB-2E6",
"TUSDB-888", "TUSDB-888",
"TWT-8C2",
"UGAS-B0C", "UGAS-B0C",
"UND-EBC", "UND-EBC",
"UPX-F3E", "UPX-F3E",
@ -124,8 +144,12 @@
"WICC-01D", "WICC-01D",
"WINB-41F", "WINB-41F",
"WISH-2D5", "WISH-2D5",
"WRX-ED1",
"XBASE-CD2", "XBASE-CD2",
"XNS-760", "XNS-760",
"XRP-BF2", "XRP-BF2",
"LOKI-6A9" "XRPBEAR-00B",
"XRPBULL-E7C",
"XTZ-F7A",
"ZEBI-84F"
] ]

View File

@ -1,4 +1,3 @@
[ [
"0x0000000000000000000000000000456E65726779", "0x0000000000000000000000000000456E65726779"
"vethor"
] ]

View File

@ -2,24 +2,55 @@ import { CoinType } from "@trustwallet/wallet-core";
export const getChainName = (id: CoinType): string => CoinType.id(id); // 60 => ethereum export const getChainName = (id: CoinType): string => CoinType.id(id); // 60 => ethereum
export const Binance = getChainName(CoinType.binance); export const Binance = getChainName(CoinType.binance);
export const Callisto = getChainName(CoinType.callisto);
export const Classic = getChainName(CoinType.classic); export const Classic = getChainName(CoinType.classic);
export const Cosmos = getChainName(CoinType.cosmos); export const Cosmos = getChainName(CoinType.cosmos);
export const EOS = getChainName(CoinType.eos);
export const Ethereum = getChainName(CoinType.ethereum); export const Ethereum = getChainName(CoinType.ethereum);
export const GoChain = getChainName(CoinType.gochain); export const GoChain = getChainName(CoinType.gochain);
export const IoTeX = getChainName(CoinType.iotex); export const IoTeX = getChainName(CoinType.iotex);
export const NEO = getChainName(CoinType.neo); export const NEO = getChainName(CoinType.neo);
export const NULS = getChainName(CoinType.nuls); export const NULS = getChainName(CoinType.nuls);
export const Ontology = getChainName(CoinType.ontology);
export const POA = getChainName(CoinType.poa); export const POA = getChainName(CoinType.poa);
export const Tezos = getChainName(CoinType.tezos); export const Tezos = getChainName(CoinType.tezos);
export const ThunderCore = getChainName(CoinType.thundertoken); export const ThunderCore = getChainName(CoinType.thundertoken);
export const Terra = getChainName(CoinType.terra); export const Terra = getChainName(CoinType.terra);
export const Theta = getChainName(CoinType.theta);
export const TomoChain = getChainName(CoinType.tomochain); export const TomoChain = getChainName(CoinType.tomochain);
export const Tron = getChainName(CoinType.tron); export const Tron = getChainName(CoinType.tron);
export const Kava = getChainName(CoinType.kava); export const Kava = getChainName(CoinType.kava);
export const Vechain = getChainName(CoinType.vechain);
export const Wanchain = getChainName(CoinType.wanchain); export const Wanchain = getChainName(CoinType.wanchain);
export const Waves = getChainName(CoinType.waves); export const Waves = getChainName(CoinType.waves);
export const Solana = getChainName(CoinType.solana); export const Solana = getChainName(CoinType.solana);
export const ethForkChains = [Ethereum, Classic, POA, TomoChain, GoChain, Wanchain, ThunderCore]; export const ethForkChains = [
export const stakingChains = [Tezos, Cosmos, IoTeX, Tron, Waves, Kava, Terra]; Ethereum,
export const chainsWithBlacklist = ethForkChains.concat(Tron, Terra, NEO, NULS); Classic,
POA,
TomoChain,
GoChain,
Wanchain,
ThunderCore
];
export const stakingChains = [
Tezos,
Cosmos,
IoTeX,
Tron,
Waves,
Kava,
Terra
];
export const chainsWithBlacklist = ethForkChains.concat(
Binance,
Tron,
Terra,
NEO,
NULS,
Vechain,
Ontology,
Theta,
EOS
);