trezor-suite icon indicating copy to clipboard operation
trezor-suite copied to clipboard

Fetch data based on hardcoded range and draw as a table

Open bouchja1 opened this issue 1 year ago • 0 comments

There are a few ranges in the app for which we need to fetch data (fiat rates).

  • 1 H
  • 1 D
  • 1 W
  • 1 M
  • 1 Y
  • ALL

dev notes:

  1. Currently used in suite to obtain payload with account transactions in time...
        const response = await TrezorConnect.blockchainGetAccountBalanceHistory({
            coin: account.symbol,
            descriptor: account.descriptor,
            groupBy: 3600 * 24, // day
        });

grouped by day because the current graph has the smallest range 1 day?

Then obtained payload is passed to getFiatRatesForTimestamps in @suite-common/fiat-services -

  1. Maybe we will need to reuse graphUtils from suite to custom common package

bouchja1 avatar Oct 07 '22 12:10 bouchja1