Skip to content

Internationalize trade quote currency values #65

@cgewecke

Description

@cgewecke

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 ],
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions