Page MenuHomePhabricator

[Cashtab] Improve handling of price API error on send screen
AbandonedPublic

Authored by kieran709 on Mar 17 2022, 21:12.

Details

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

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
handle-api-error-send-screen
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18552
Build 36899: Build Diffcashtab-tests
Build 36898: arc lint + arc unit

Event Timeline

Nice. Let's also disable the input field if we are in this condition (and fiat currency is selected) -- to avoid this case where a validation error is thrown even though it makes no sense:

image.png (301×480 px, 21 KB)

This revision now requires changes to proceed.Mar 17 2022, 21:21