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
Lint
Lint Not Applicable
Unit
Tests Not Applicable