Page MenuHomePhabricator

[Cashtab] Deprecate all duplicated legacy implementations of toXec and toSatoshis
ClosedPublic

Authored by bytesofman on Jan 20 2024, 01:31.

Details

Summary

Bad buildup of functions that do basically the same thing. Get rid of it.

Depends on D15217

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
deprecate-old-helpers
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26520
Build 52610: Build Diffcashtab-tests
Build 52609: arc lint + arc unit

Event Timeline

emack requested changes to this revision.Jan 20 2024, 11:48
emack added a subscriber: emack.
emack added inline comments.
cashtab/src/validation/index.js
427 ↗(On Diff #44381)

Further above in __mocks__/sendBCH.js the appConfig.dustSats param value is fed through parseInt() before passed to toXec(). Should this be standardized across the diff for consistency?

This revision now requires changes to proceed.Jan 20 2024, 11:48

rebase, remove unneeded parseInts

This revision is now accepted and ready to land.Jan 20 2024, 22:27

prevent render errors in Alias component, number instead of string bug

cashtab/src/validation/index.js
427 ↗(On Diff #44381)

should be standardized, will fix

the parseInt case is actually the bug, appConfig.dustSats is already an integer