Page MenuHomePhabricator

[Cashtab] Implement BigNumber.js for crypto amounts
ClosedPublic

Authored by bytesofman on Jan 22 2021, 17:06.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC5f96006ad6df: [Cashtab] Implement BigNumber.js for crypto amounts
Summary

Ensure high precision decimals are handled accurately.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
add-bignumber-to-validation
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14960
Build 29872: Build Diffcashtab-tests
Build 29871: arc lint + arc unit

Event Timeline

bytesofman updated this revision to Diff 27274.

Remove unused BigNumber.js import from validation.test.js

Ensure testedAmount is still validated as a BigNumber if user selected USD

Fabien requested changes to this revision.Jan 22 2021, 19:15
Fabien added a subscriber: Fabien.
Fabien added inline comments.
web/cashtab/src/utils/__tests__/validation.test.js
80 ↗(On Diff #27275)

Actually check the value ?

This revision now requires changes to proceed.Jan 22 2021, 19:15

Ensure function fiatToCrypto returns a string, add unit test

Clarify comment in function

Fabien added inline comments.
web/cashtab/src/utils/validation.js
39 ↗(On Diff #27280)

with more => with no more

This revision is now accepted and ready to land.Jan 23 2021, 15:03

Fix typo in comment, "more" to "no more"