Closed bergeron closed 3 weeks ago
Would it be viable to make the public API less tightly coupled to Crypto Compare API?
Would make it less involved to make future changes and make it more flexible and robust at the same time.
Related: https://github.com/MetaMask/core/pull/4852/files#r1817508642
Would it be viable to make the public API less tightly coupled to Crypto Compare API?
Can you explain what you're thinking? The crypto compare stuff is already behind a separate service with generic interfaces for fetchExchangeRate
and fetchMultiExchangeRate
.
@metamaskbot publish-preview
Preview builds have been published. See these instructions for more information about preview builds.
Explanation
Updates the currency rate controller to use the
pricemulti
endpoint of crypto compare. This allows us to fetch exchange rates for multiple native currencies in a single http request.References
Changelog
@metamask/assets-controllers
CurrencyRateController
now accepts an array of native currencies as its polling input.RatesController
now types theconversionRate
andusdConversionRate
in its state asnumber
instead ofstring
, to match what it was actually storing.Checklist