HomePhabricator

[Cashtab] Do not reset forms on fiat price change unless price is unavailable

Description

[Cashtab] Do not reset forms on fiat price change unless price is unavailable

Summary:
Have had this reported from a couple of sources. Cashtab is always updating the fiat price in the background. It refreshes every 90s, logic is in useWallet.ts. This info is passed to components through context.

If a user is attempting to set price with fiat, it's important we have a value for fiatPrice. CoinGecko may be down or rate limited, so Cashtab must also be tolerant of having no fiat price.

In this case, we only want to reset forms if we were relying on the price info. We do not need to reset price fields if XEC was selected.

Test Plan:
npm test

npm start, fill out qty in redeem xecx on the xecx token page, wait 3 min and confirm the quantity does not resent when price changes

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Mon, Mar 3, 17:47
bytesofmanPushed on Tue, Mar 4, 00:49
Reviewer
Restricted Project
Differential Revision
D17738: [Cashtab] Do not reset forms on fiat price change unless price is unavailable
Parents
rABC601acac03dc6: [avalanche] Down-rank rejected contenders
Branches
Unknown
Tags
Unknown