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 Oct 26 2024, 20:39
teamcityPushed on Oct 26 2024, 23:51
Parents
rSTAGING7467e93e04be: [Cashtab] Fix bug in agora tx parsing
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/50480, tag: phabricator/base/50470, tag: phabricator/base/50469, tag: phabricator/base/50468

Event Timeline