Move quote currency string into config

This commit is contained in:
Brandon Millman
2018-04-27 14:59:22 -07:00
parent 005e633e2a
commit feb7dfffa1
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
});

View File

@@ -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'],