diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-04-28 05:59:22 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-04-28 06:05:23 +0800 |
commit | feb7dfffa107211e76b87d2028b8c821e914f0d6 (patch) | |
tree | 23408fc73a58fc6e8636652092cbc52609be5072 /packages | |
parent | 005e633e2a3c08b8f9de79f643795f04259604c6 (diff) | |
download | dexon-sol-tools-feb7dfffa107211e76b87d2028b8c821e914f0d6.tar dexon-sol-tools-feb7dfffa107211e76b87d2028b8c821e914f0d6.tar.gz dexon-sol-tools-feb7dfffa107211e76b87d2028b8c821e914f0d6.tar.bz2 dexon-sol-tools-feb7dfffa107211e76b87d2028b8c821e914f0d6.tar.lz dexon-sol-tools-feb7dfffa107211e76b87d2028b8c821e914f0d6.tar.xz dexon-sol-tools-feb7dfffa107211e76b87d2028b8c821e914f0d6.tar.zst dexon-sol-tools-feb7dfffa107211e76b87d2028b8c821e914f0d6.zip |
Move quote currency string into config
Diffstat (limited to 'packages')
-rw-r--r-- | packages/website/ts/components/wallet/wallet.tsx | 5 | ||||
-rw-r--r-- | packages/website/ts/utils/configs.ts | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx index 2097c0eab..33b8bbffb 100644 --- a/packages/website/ts/components/wallet/wallet.tsx +++ b/packages/website/ts/components/wallet/wallet.tsx @@ -526,10 +526,9 @@ export class Wallet extends React.Component<WalletProps, WalletState> { ), ); const joinedTokenSymbols = _.keys(tokenAddressBySymbol).join(','); - const quoteCurrency = 'USD'; const queryParams = { fsyms: joinedTokenSymbols, - tsyms: quoteCurrency, + tsyms: configs.FIAT_QUOTE_CURRENCY_SYMBOL, }; try { this._cryptoCompareLastFetchTimestampMs = Date.now(); @@ -542,7 +541,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> { _.get(tokenAddressBySymbol, symbol), ); const result = _.mapValues(priceInfoByAddress, priceInfo => { - const price = _.get(priceInfo, quoteCurrency); + const price = _.get(priceInfo, configs.FIAT_QUOTE_CURRENCY_SYMBOL); const priceBigNumber = new BigNumber(price); return priceBigNumber; }); diff --git a/packages/website/ts/utils/configs.ts b/packages/website/ts/utils/configs.ts index edfd04291..a214593d4 100644 --- a/packages/website/ts/utils/configs.ts +++ b/packages/website/ts/utils/configs.ts @@ -14,6 +14,7 @@ export const configs = { BASE_URL, BITLY_ACCESS_TOKEN: 'ffc4c1a31e5143848fb7c523b39f91b9b213d208', CRYPTO_COMPARE_BASE_URL: 'https://min-api.cryptocompare.com/data', + FIAT_QUOTE_CURRENCY_SYMBOL: 'USD', DEFAULT_DERIVATION_PATH: `44'/60'/0'`, // WARNING: ZRX & WETH MUST always be default trackedTokens DEFAULT_TRACKED_TOKEN_SYMBOLS: ['WETH', 'ZRX'], |