Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Use atomiclabs/cryptocurrency-icons/ set of icons #488

Merged
merged 9 commits into from
Apr 3, 2019

Conversation

Tbaut
Copy link
Collaborator

@Tbaut Tbaut commented Apr 2, 2019

Because the security PR (#451) will prevent Fether from fetching random urls, we need to have one source for ERC-20 icons. I chose https://github.com/atomiclabs/cryptocurrency-icons/ github repo.

  • Sadly ThibCoin and GavCoin have no face anymore, but most crypto have.

Here is an example with a mainnet random account:

localStorage.setItem("localforage/__paritylight::paritySignerAccounts", '[{"address":"0x564286362092D8e7936f0549571a803B203aAceD","name":"Random","chainId":1}]');

image

@Tbaut Tbaut requested a review from amaury1093 April 3, 2019 12:14
Copy link
Collaborator

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's one error I got when running the script:

(node:21668) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'address' of undefined
    at checkForDuplicateAddresses (/Users/amaurymartiny/Workspaces/fether/scripts/updateTokens/update-tokens-utils.ts:76:13)
    at Object.<anonymous> (/Users/amaurymartiny/Workspaces/fether/scripts/updateTokens/update-tokens-utils.ts:39:3)
    at step (/Users/amaurymartiny/Workspaces/fether/scripts/updateTokens/update-tokens-utils.ts:43:23)
    at Object.next (/Users/amaurymartiny/Workspaces/fether/scripts/updateTokens/update-tokens-utils.ts:24:53)
    at fulfilled (/Users/amaurymartiny/Workspaces/fether/scripts/updateTokens/update-tokens-utils.ts:15:58)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
(node:21668) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21668) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@Tbaut do you have this too?

EDIT: Can't reproduce

}
return token;
})
.catch(error => console.error("Error:", error));
Copy link
Collaborator

@amaury1093 amaury1093 Apr 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove these console.errors here, it seems like the script is producing errors, whereas these are expected

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the mentioned error. But you think it's related to this .catch?

This is what I have

yarn update-tokens --use-hardcoded-ipfs-addresses
yarn run v1.15.2
$ yarn run ts-node --project scripts/updateTokens/tsconfig.json scripts/updateTokens --use-hardcoded-ipfs-addresses
$ /home/thib/paritytech/fether/node_modules/.bin/ts-node --project scripts/updateTokens/tsconfig.json scripts/updateTokens --use-hardcoded-ipfs-addresses
Using hardcoded IPFS addresses...
Using the following addresses: { eth:
'https://cloudflare-ipfs.com/ipfs/QmUJJpSQXWiKh6Jex6wLSZ1RWND8CxJu6XQMb7v2ByQhTR',
gor:
'https://cloudflare-ipfs.com/ipfs/QmYznKJJK52BaLkQVJnzeaJNf8U4QAFkFXd2PGVaT29otW',
kov:
'https://cloudflare-ipfs.com/ipfs/QmZUXkAH69BpjJWcpND5HnQVsro6CXVxKiSX9vK49KsyZn',
rop:
'https://cloudflare-ipfs.com/ipfs/QmRAzyMEFNFFRqKTMcpk5qDdTpctgTDQU2PN8RPXSt5guj' }
Writing Tokens JSON to /packages/fether-react/src/assets/tokens/ropsten.json...
Writing Tokens JSON to /packages/fether-react/src/assets/tokens/kovan.json...
Succesfully imported 6 tokens!
Succesfully imported 12 tokens!
Writing Tokens JSON to /packages/fether-react/src/assets/tokens/goerli.json...
Succesfully imported 1 tokens!
WARN: "ECP" has a duplicate symbol, renaming to "ECP (ECRYPTO COIN)"
WARN: "ECP" has a duplicate symbol, renaming to "ECP (ECrypto Coin)"
WARN: "TEL" has a duplicate symbol, renaming to "TEL (Telcoin)"
WARN: "TEL" has a duplicate symbol, renaming to "TEL (Meditel)"
WARN: "EXC" has a duplicate symbol, renaming to "EXC (Eximchain Token)"
WARN: "EXC" has a duplicate symbol, renaming to "EXC (EXCOIN CASH )"
WARN: "GANA" has a duplicate symbol, renaming to "GANA (1)"
WARN: "GANA" has a duplicate symbol, renaming to "GANA (2)"
WARN: "LCT" has a duplicate symbol, renaming to "LCT (LendConnect)"
WARN: "LCT" has a duplicate symbol, renaming to "LCT (LiquorChain Token)"
WARN: "CARD" has a duplicate symbol, renaming to "CARD (1)"
WARN: "CARD" has a duplicate symbol, renaming to "CARD (2)"
WARN: "CARD" has a duplicate symbol, renaming to "CARD (3)"
WARN: "RING" has a duplicate symbol, renaming to "RING (1)"
WARN: "RING" has a duplicate symbol, renaming to "RING (2)"
WARN: "RCT" has a duplicate symbol, renaming to "RCT (RealChain)"
WARN: "RCT" has a duplicate symbol, renaming to "RCT (RCT)"
WARN: "SMT" has a duplicate symbol, renaming to "SMT (SmartMesh)"
WARN: "SMT" has a duplicate symbol, renaming to "SMT (Smart Node)"
WARN: "SMT" has a duplicate symbol, renaming to "SMT (Social Media Market)"
WARN: "BKB" has a duplicate symbol, renaming to "BKB (BitKeep Token)"
WARN: "BKB" has a duplicate symbol, renaming to "BKB (BetKing Bankroll Token)"
WARN: "SS" has a duplicate symbol, renaming to "SS (1)"
WARN: "SS" has a duplicate symbol, renaming to "SS (2)"
WARN: "REP" has a duplicate symbol, renaming to "REP (1)"
WARN: "REP" has a duplicate symbol, renaming to "REP (2)"
WARN: "MORE" has a duplicate symbol, renaming to "MORE (More Coin)"
WARN: "MORE" has a duplicate symbol, renaming to "MORE (Mithril Ore)"
WARN: "MTC" has a duplicate symbol, renaming to "MTC (Medical Token Currency)"
WARN: "MTC" has a duplicate symbol, renaming to "MTC (MTC Mesh Network)"
WARN: "CAS" has a duplicate symbol, renaming to "CAS (Cashaa)"
WARN: "CAS" has a duplicate symbol, renaming to "CAS (CAS Coin)"
WARN: "CDX" has a duplicate symbol, renaming to "CDX (Carbon Dollar X)"
WARN: "CDX" has a duplicate symbol, renaming to "CDX (Commodity Ad Network)"
WARN: "PRPS" has a duplicate symbol, renaming to "PRPS (1)"
WARN: "PRPS" has a duplicate symbol, renaming to "PRPS (2)"
WARN: "PRPS" has a duplicate symbol, renaming to "PRPS (3)"
WARN: "BCAP" has a duplicate symbol, renaming to "BCAP (1)"
WARN: "BCAP" has a duplicate symbol, renaming to "BCAP (2)"
WARN: "COSS" has a duplicate symbol, renaming to "COSS (1)"
WARN: "COSS" has a duplicate symbol, renaming to "COSS (2)"
WARN: "PASS" has a duplicate symbol, renaming to "PASS (PASS Token)"
WARN: "PASS" has a duplicate symbol, renaming to "PASS (Blockpass)"
WARN: "DUBI" has a duplicate symbol, renaming to "DUBI (DUBI)"
WARN: "DUBI" has a duplicate symbol, renaming to "DUBI (2)"
WARN: "DUBI" has a duplicate symbol, renaming to "DUBI (3)"
WARN: "SKRP" has a duplicate symbol, renaming to "SKRP (1)"
WARN: "SKRP" has a duplicate symbol, renaming to "SKRP (2)"
WARN: "SKRP" has a duplicate symbol, renaming to "SKRP (3)"
WARN: "OPEN" has a duplicate symbol, renaming to "OPEN (OPEN)"
WARN: "OPEN" has a duplicate symbol, renaming to "OPEN (OPEN Platform)"
WARN: "WORK" has a duplicate symbol, renaming to "WORK (Aworker)"
WARN: "WORK" has a duplicate symbol, renaming to "WORK (workTOKEN)"
WARN: "BNC" has a duplicate symbol, renaming to "BNC (Bionic)"
WARN: "BNC" has a duplicate symbol, renaming to "BNC (BNC)"
WARN: "BTR" has a duplicate symbol, renaming to "BTR (1)"
WARN: "BTR" has a duplicate symbol, renaming to "BTR (Bither Platform Token)"
WARN: "SGT" has a duplicate symbol, renaming to "SGT (SelfieYo Gold Token)"
WARN: "SGT" has a duplicate symbol, renaming to "SGT (SGT)"
WARN: "YEED" has a duplicate symbol, renaming to "YEED (YGGDRASH)"
WARN: "YEED" has a duplicate symbol, renaming to "YEED (YEED)"
WARN: "TICO" has a duplicate symbol, renaming to "TICO (1)"
WARN: "TICO" has a duplicate symbol, renaming to "TICO (2)"
WARN: "CPT" has a duplicate symbol, renaming to "CPT (Cryptaur)"
WARN: "CPT" has a duplicate symbol, renaming to "CPT (Contents Protocol Token)"
WARN: "IMT" has a duplicate symbol, renaming to "IMT (Moneytoken)"
WARN: "IMT" has a duplicate symbol, renaming to "IMT (IMT)"
WARN: "FUCK" has a duplicate symbol, renaming to "FUCK (Finally Usable Crypto Karma)"
WARN: "FUCK" has a duplicate symbol, renaming to "FUCK (FinallyUsableCryptoKarma)"
WARN: "WHO" has a duplicate symbol, renaming to "WHO (1)"
WARN: "WHO" has a duplicate symbol, renaming to "WHO (2)"
WARN: "WOLK" has a duplicate symbol, renaming to "WOLK (WOLK)"
WARN: "WOLK" has a duplicate symbol, renaming to "WOLK (Wolk Token)"
WARN: "FLMC" has a duplicate symbol, renaming to "FLMC (1)"
WARN: "FLMC" has a duplicate symbol, renaming to "FLMC (2)"
WARN: "PRO" has a duplicate symbol, renaming to "PRO (Pro)"
WARN: "PRO" has a duplicate symbol, renaming to "PRO (Propy)"
WARN: "KEY" has a duplicate symbol, renaming to "KEY (BihuKey)"
WARN: "KEY" has a duplicate symbol, renaming to "KEY (SelfKey)"
WARN: "BOX" has a duplicate symbol, renaming to "BOX (BOX Token)"
WARN: "BOX" has a duplicate symbol, renaming to "BOX (ContentBox)"
WARN: "FXC" has a duplicate symbol, renaming to "FXC (Flexacoin)"
WARN: "FXC" has a duplicate symbol, renaming to "FXC (2)"
WARN: "NTK" has a duplicate symbol, renaming to "NTK (Neurotoken)"
WARN: "NTK" has a duplicate symbol, renaming to "NTK (NetKoin)"
WARN: "PCH" has a duplicate symbol, renaming to "PCH (POPCHAIN)"
WARN: "PCH" has a duplicate symbol, renaming to "PCH (PITCH)"
WARN: "ORME" has a duplicate symbol, renaming to "ORME (1)"
WARN: "ORME" has a duplicate symbol, renaming to "ORME (2)"
WARN: "DOW" has a duplicate symbol, renaming to "DOW (1)"
WARN: "DOW" has a duplicate symbol, renaming to "DOW (2)"
WARN: "A18" has a duplicate symbol, renaming to "A18 (1)"
WARN: "A18" has a duplicate symbol, renaming to "A18 (2)"
WARN: "OHNI" has a duplicate symbol, renaming to "OHNI (Ohni)"
WARN: "OHNI" has a duplicate symbol, renaming to "OHNI (OHNI)"
WARN: "TIC" has a duplicate symbol, renaming to "TIC (Thingschain)"
WARN: "TIC" has a duplicate symbol, renaming to "TIC (Trust Invest)"
WARN: "EVN" has a duplicate symbol, renaming to "EVN (Envion AG)"
WARN: "EVN" has a duplicate symbol, renaming to "EVN (EvenCoin)"
WARN: "VRS" has a duplicate symbol, renaming to "VRS (1)"
WARN: "VRS" has a duplicate symbol, renaming to "VRS (2)"
WARN: "FANX" has a duplicate symbol, renaming to "FANX (1)"
WARN: "FANX" has a duplicate symbol, renaming to "FANX (2)"
WARN: "LEMO" has a duplicate symbol, renaming to "LEMO (1)"
WARN: "LEMO" has a duplicate symbol, renaming to "LEMO (2)"
WARN: "LEMO" has a duplicate symbol, renaming to "LEMO (3)"
WARN: "LYM" has a duplicate symbol, renaming to "LYM (1)"
WARN: "LYM" has a duplicate symbol, renaming to "LYM (2)"
WARN: "MESH" has a duplicate symbol, renaming to "MESH (BlockMesh)"
WARN: "MESH" has a duplicate symbol, renaming to "MESH (Meshbox)"
WARN: "COIN" has a duplicate symbol, renaming to "COIN (Coinvest V2 Token)"
WARN: "COIN" has a duplicate symbol, renaming to "COIN (Coinvest V3 Token)"
WARN: "UMKA" has a duplicate symbol, renaming to "UMKA (1)"
WARN: "UMKA" has a duplicate symbol, renaming to "UMKA (2)"
WARN: "JBX" has a duplicate symbol, renaming to "JBX (JBOX)"
WARN: "JBX" has a duplicate symbol, renaming to "JBX (JBX)"
WARN: "DRP" has a duplicate symbol, renaming to "DRP (DCorp)"
WARN: "DRP" has a duplicate symbol, renaming to "DRP (Dripcoin)"
WARN: "NCC" has a duplicate symbol, renaming to "NCC (NeedsCoin)"
WARN: "NCC" has a duplicate symbol, renaming to "NCC (NeuroChain)"
Writing Tokens JSON to /packages/fether-react/src/assets/tokens/foundation.json...
Succesfully imported 1236 tokens!
Done in 11.06s.

Copy link
Collaborator

@amaury1093 amaury1093 Apr 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the error I copy-pasted here #488 (review) is due to this line
https://github.com/paritytech/fether/blob/699450acfbb62337c6b3605f7a4ff086a4fa21e3/scripts/updateTokens/update-tokens-utils.ts#L76

However I can't reproduce, so let's forget about it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment #488 (comment) is smaller, my proposal was to remove console.error here. You can "simulate" a non-existing token image by e.g. putting a typo in the fetchUrl. There'll be tons of error messages on the screen, but we could silently ignore them.

Or we can keep like this, it's not a big deal

@Tbaut Tbaut merged commit fac1c0f into master Apr 3, 2019
@Tbaut Tbaut deleted the tbaut-fetch-missing-icons branch April 3, 2019 13:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants