Skip to content

[assets-controllers] Migrate Token price batch update to token prices service #4117

Open
@Gudahtt

Description

@Gudahtt

We have support for updating token prices in batches. This functionality is built-in to the TokenRatesController, and was separately implemented as the fetchTokenContractExchangeRates utility function (see #3657).

We should migrate this functionality to the token price service itself. It makes sense for this to be in-scope for the responsibilities of that service, because the whole reason for updating token prices in batches is to optimize our usage of this service and workaround its limitations. For example, the original batch size of 100 was chosen due to the maximum supported query string length for this service, and the later update to use a batch size of 30 was done to optimize costs for running this service. This functionality is intrinsically tied to this specific service, it should be managed in the same place.

Migrating this logic into the service would also reduce duplication between the TokenRatesController and the fetchTokenContractExchangeRates utility function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions