Page MenuHomePhabricator

[Cashtab] Fix agora depth bar fill effect
ClosedPublic

Authored by bytesofman on Sat, Oct 26, 20:41.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC6d59de58ec11: [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)

Diff Detail

Repository
rABC Bitcoin ABC
Branch
candle-fix
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30856
Build 61225: Build Diffcashtab-tests
Build 61224: arc lint + arc unit