From fe8f2d87c79cb25a7879c2e737dbdd64b7c40f60 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 15 Dec 2017 14:07:14 -0600 Subject: Temporary hack to alleviate issues with updating tokenRegistry with new WETH address --- packages/website/ts/blockchain.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 331bafa71..6877a301a 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -592,9 +592,22 @@ export class Blockchain { // HACK: For now we have a hard-coded list of iconUrls for the dummyTokens // TODO: Refactor this out and pull the iconUrl directly from the TokenRegistry const iconUrl = constants.iconUrlBySymbol[t.symbol]; + // HACK: Temporarily we hijack the WETH addresses fetched from the tokenRegistry + // so that we can take our time with actually updating it. This ensures that when + // we deploy the new WETH page, everyone will re-fill their trackedTokens with the + // new canonical WETH. + // TODO: Remove this hack once we've updated the TokenRegistries + let address = t.address; + if (t.symbol === 'WETH') { + if (this.networkId === 1) { + address = '0xe495bcacaf29a0eb00fb67b86e9cd2a994dd55d8'; + } else if (this.networkId === 42) { + address = '0x739e78d6bebbdf24105a5145fa04436589d1cbd9'; + } + } const token: Token = { iconUrl, - address: t.address, + address, name: t.name, symbol: t.symbol, decimals: t.decimals, -- cgit