HomePhabricator

[Cashtab] Improve handling of priceApiError in Send.js

Description

[Cashtab] Improve handling of priceApiError in Send.js

Summary: Related to task T2315. In Send.js, added checks for priceApiError to grey out send button if priceApiError is true, and another which hides LocaleFormattedValue if priceApiError is true. In EnhancedInputs.js, a disabled prop has been added which is used in Send.js to disable the amount input if priceApiError is true.

Test Plan:
cd web/cashtab && npm start
in useWallet.js, introduce a typo into the string to force an error msg
navigate the send tab
in the amount field, select the fiat currency from the dropdown menu
observe that the LocaleFormatted value does not appear
observe that the send button is greyed out
observe that the amount input is disabled

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
kieran709Authored on Mar 18 2022, 16:06
kieran709Pushed on Mar 18 2022, 21:35
Reviewer
Restricted Project
Differential Revision
D11228: [Cashtab] Improve handling of priceApiError in Send.js
Parents
rABCd3c77bdf01e9: [Cashtab] Send XEC/eToken confirmation modal w/ settings switch
Branches
Unknown
Tags
Unknown