-
Notifications
You must be signed in to change notification settings - Fork 15
Description
At the moment prices are returned in USD and there are no other currency options. From #60 review
It's interesting seeing this kind of code here, I know it's a direct mapping of what's happening in the service right now, but it feels like we'd want a separation of generating the data and formatting the data.
We previously followed a "dumb" client type of approach where the client only needed to display strings and not worry about formatting but its weird seeing that now in a library.
Also note, in #60 there's an open question whether the vs_currencies
parameter of the CoinGecko coin prices req needs to be paired one-for-one with the addresses lists:
set.js/src/api/utils/tradeQuoter.ts
Lines 141 to 144 in 2c360f0
const coinPrices = await coinGecko.fetchCoinPrices({ | |
contractAddresses: [this.chainCurrencyAddress(chainId), fromTokenAddress, toTokenAddress], | |
vsCurrencies: [ USD_CURRENCY_CODE, USD_CURRENCY_CODE, USD_CURRENCY_CODE ], | |
}); |