diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-05-01 07:49:47 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-05-01 07:49:47 +0800 |
commit | 3a1f9d01e8cdb40fbb293de10046fa654434dde4 (patch) | |
tree | 5f7d3b35718f4b04f974824be8040dcb22570326 /packages/website | |
parent | 1131d66b3db2bde04b5108d710801fab7eaf0ede (diff) | |
download | dexon-sol-tools-3a1f9d01e8cdb40fbb293de10046fa654434dde4.tar dexon-sol-tools-3a1f9d01e8cdb40fbb293de10046fa654434dde4.tar.gz dexon-sol-tools-3a1f9d01e8cdb40fbb293de10046fa654434dde4.tar.bz2 dexon-sol-tools-3a1f9d01e8cdb40fbb293de10046fa654434dde4.tar.lz dexon-sol-tools-3a1f9d01e8cdb40fbb293de10046fa654434dde4.tar.xz dexon-sol-tools-3a1f9d01e8cdb40fbb293de10046fa654434dde4.tar.zst dexon-sol-tools-3a1f9d01e8cdb40fbb293de10046fa654434dde4.zip |
Remove WETH special case, website backend handles this now
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/ts/components/wallet/wallet.tsx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx index 9022eb1c9..057c712e5 100644 --- a/packages/website/ts/components/wallet/wallet.tsx +++ b/packages/website/ts/components/wallet/wallet.tsx @@ -498,17 +498,13 @@ export class Wallet extends React.Component<WalletProps, WalletState> { const tokenIfExists = _.get(this.props.tokenByAddress, address); if (!_.isUndefined(tokenIfExists)) { const symbol = tokenIfExists.symbol; - // the crypto compare api doesn't understand 'WETH' so we need to replace it with 'ETH' - const key = symbol === ETHER_TOKEN_SYMBOL ? ETHER_SYMBOL : symbol; - tokenAddressBySymbol[key] = address; + tokenAddressBySymbol[symbol] = address; } }); const tokenSymbols = _.keys(tokenAddressBySymbol); try { const priceBySymbol = await backendClient.getPriceInfoAsync(tokenSymbols); - const priceByAddress = _.mapKeys(priceBySymbol, (value, symbol) => - _.get(tokenAddressBySymbol, symbol), - ); + const priceByAddress = _.mapKeys(priceBySymbol, (value, symbol) => _.get(tokenAddressBySymbol, symbol)); const result = _.mapValues(priceByAddress, price => { const priceBigNumber = new BigNumber(price); return priceBigNumber; |