aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-27 18:38:22 +0800
committerFabio Berger <me@fabioberger.com>2018-03-27 18:38:22 +0800
commit3e3b6673660b7358ff31a2ae2c5766b265e57cb0 (patch)
tree0cd97ce57720606006f815cc7164307432738778 /packages/website/ts/blockchain.ts
parent3b45d4727b14d2ad15784a18f4a47cf0deb40f27 (diff)
downloaddexon-0x-contracts-3e3b6673660b7358ff31a2ae2c5766b265e57cb0.tar.gz
dexon-0x-contracts-3e3b6673660b7358ff31a2ae2c5766b265e57cb0.tar.zst
dexon-0x-contracts-3e3b6673660b7358ff31a2ae2c5766b265e57cb0.zip
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.ts22
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,