Page MenuHomePhabricator

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

Authored by bytesofman on Mon, Mar 3, 17:49.

Details

Reviewers
None
Group Reviewers
Restricted Project
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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
price-updates-no-form-reset
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32571
Build 64630: Build Diffcashtab-tests
Build 64629: arc lint + arc unit