Page MenuHomePhabricator

[Cashtab] Add some clarifying comments on the confusing use of BN in slpv1 tx building
ClosedPublic

Authored by bytesofman on Mar 31 2024, 21:08.

Details

Summary

slp-mdm requires all inputs to be in "token satoshis", i.e. an integer of the token's smallest unit of account. Users input quantities as decimalized strings, so Cashtab must convert these to token satoshis before calling slp-mdm methods.

We are doing this but it isn't immediately clear to someone who has not been working with this lib what is going on. Add some comments.

Going forward, will extend slp-mdm to support all ecash tokens be a bit more dev-friendly.

Test Plan

Confirm only changes are comments

Diff Detail

Repository
rABC Bitcoin ABC
Branch
use-token-satoshis
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28223
Build 55991: Build Diffcashtab-tests
Build 55990: arc lint + arc unit