aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-05-01 07:49:47 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-05-01 07:49:47 +0800
commit3a1f9d01e8cdb40fbb293de10046fa654434dde4 (patch)
tree5f7d3b35718f4b04f974824be8040dcb22570326 /packages/website
parent1131d66b3db2bde04b5108d710801fab7eaf0ede (diff)
downloaddexon-sol-tools-3a1f9d01e8cdb40fbb293de10046fa654434dde4.tar.gz
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.tsx8
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;