Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalize trade quote currency values #65

Open
cgewecke opened this issue Jun 14, 2021 · 0 comments
Open

Internationalize trade quote currency values #65

cgewecke opened this issue Jun 14, 2021 · 0 comments

Comments

@cgewecke
Copy link
Contributor

cgewecke commented Jun 14, 2021

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:

const coinPrices = await coinGecko.fetchCoinPrices({
contractAddresses: [this.chainCurrencyAddress(chainId), fromTokenAddress, toTokenAddress],
vsCurrencies: [ USD_CURRENCY_CODE, USD_CURRENCY_CODE, USD_CURRENCY_CODE ],
});

@cgewecke cgewecke mentioned this issue Jun 14, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant