HomePhabricator

[Cashtab] Fix agora depth bar fill effect

Description

[Cashtab] Fix agora depth bar fill effect

Summary:
Lost this when converted all the math to bigints

In this case, we need to use either Number or a BigNumber library. (smaller bigint) / (bigger bigint) will always be 0 ... until in Agora, it can be 1, when acceptTokens = offeredTokens.

Since this value is only used for shading UI, we do not need great precision, and Number is fine.

Test Plan:
npm test, review screenshots

current behavior: we do not show accepted portion on depth bars until we are accepting 100% of it

image.png (342×471 px, 38 KB)

after: expected behavior is back (the portion of the candle the user is accepting with the slider is highlighted in green)

image.png (342×471 px, 38 KB)

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Sat, Oct 26, 20:39
bytesofmanPushed on Sat, Oct 26, 23:47
Reviewer
Restricted Project
Differential Revision
D17016: [Cashtab] Fix agora depth bar fill effect
Parents
rABC7467e93e04be: [Cashtab] Fix bug in agora tx parsing
Branches
Unknown
Tags
Unknown