diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-28 17:41:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 17:41:53 +0800 |
commit | 18cac3f0927a0424e3618fd56dba73fc9dfc0288 (patch) | |
tree | fc6407a8f8cc2bf5544c48e6c1f6f1cc66a42c15 /packages/website/ts/blockchain.ts | |
parent | f3cb484f828b456cdcf8d060d4e6d2da2240ae69 (diff) | |
parent | 3e3b6673660b7358ff31a2ae2c5766b265e57cb0 (diff) | |
download | dexon-sol-tools-18cac3f0927a0424e3618fd56dba73fc9dfc0288.tar dexon-sol-tools-18cac3f0927a0424e3618fd56dba73fc9dfc0288.tar.gz dexon-sol-tools-18cac3f0927a0424e3618fd56dba73fc9dfc0288.tar.bz2 dexon-sol-tools-18cac3f0927a0424e3618fd56dba73fc9dfc0288.tar.lz dexon-sol-tools-18cac3f0927a0424e3618fd56dba73fc9dfc0288.tar.xz dexon-sol-tools-18cac3f0927a0424e3618fd56dba73fc9dfc0288.tar.zst dexon-sol-tools-18cac3f0927a0424e3618fd56dba73fc9dfc0288.zip |
Merge pull request #483 from 0xProject/refactor/removeHardcodedWeth
Remove WETH hack now that updated WETH address is in TokenRegistry
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r-- | packages/website/ts/blockchain.ts | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 2268bf1ab..72cb94c02 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -151,13 +151,6 @@ export class Blockchain { } public async isAddressInTokenRegistryAsync(tokenAddress: string): Promise<boolean> { utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.'); - // HACK: temporarily whitelist the new WETH token address `as if` they were - // already in the tokenRegistry. - // TODO: Remove this hack once we've updated the TokenRegistries - // Airtable task: https://airtable.com/tblFe0Q9JuKJPYbTn/viwsOG2Y97qdIeCIO/recv3VGmIorFzHBVz - if (configs.SHOULD_DEPRECATE_OLD_WETH_TOKEN && tokenAddress === configs.NEW_WRAPPED_ETHERS[this.networkId]) { - return true; - } const tokenIfExists = await this._zeroEx.tokenRegistry.getTokenIfExistsAsync(tokenAddress); return !_.isUndefined(tokenIfExists); } @@ -744,22 +737,9 @@ 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 = configs.ICON_URL_BY_SYMBOL[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 - // Airtable task: https://airtable.com/tblFe0Q9JuKJPYbTn/viwsOG2Y97qdIeCIO/recv3VGmIorFzHBVz - let address = t.address; - if (configs.SHOULD_DEPRECATE_OLD_WETH_TOKEN && t.symbol === 'WETH') { - const newEtherTokenAddressIfExists = configs.NEW_WRAPPED_ETHERS[this.networkId]; - if (!_.isUndefined(newEtherTokenAddressIfExists)) { - address = newEtherTokenAddressIfExists; - } - } const token: Token = { iconUrl, - address, + address: t.address, name: t.name, symbol: t.symbol, decimals: t.decimals, |