HomePhabricator

[Cashtab] Add toggle switch to show Agora prices in XEC or fiat

Description

[Cashtab] Add toggle switch to show Agora prices in XEC or fiat

Summary:
T3711

In general, fiat prices can be more "intuitive." However in practice this is not often the case for Agora spot prices, which may be something like $0.000017 USD per token.

Add a toggle switch to make it easy to switch.

The Switch component is updated to typescript while we are at it. Needed to do this to troubleshoot behavior of "hit switch on one component, toggles it on a different one". This ended up being related to Switch needing a unique name. Important React caveat to keep in mind when rendering 100s of components...especially when they all can spend money.

Test Plan:
npm test

fiat

image.png (534×341 px, 52 KB)

xec

image.png (534×341 px, 51 KB)

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: emack

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

Details

Provenance
bytesofmanAuthored on Mon, Dec 23, 14:32
teamcityPushed on Tue, Dec 24, 01:22
Parents
rSTAGING504a0b703be6: Fix a race in abc_p2p_avalanche_remote_proofs.py
Branches
Unknown
Tags
Unknown
References
HEAD -> master, tag: phabricator/base/51738, tag: phabricator/base/51737, tag: phabricator/base/51736

Event Timeline