HomePhabricator

[Cashtab] Improve and simplify fiat API

Description

[Cashtab] Improve and simplify fiat API

Summary:
We should always throw an error if we do not get a good price. The "double" try...catch is not necessary.

Part of the codebase that has not been changed for years, implementing better practices. Also bumping the interval as 60s was resulting in rate limits.

Test Plan: npm test

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D15700

Event Timeline