HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Differential Revision: https://reviews.bitcoinabc.org/D15835

Details

Provenance
bytesofmanAuthored on Mar 31 2024, 21:07
bytesofmanPushed on Apr 1 2024, 03:03
Reviewer
Restricted Project
Differential Revision
D15835: [Cashtab] Add some clarifying comments on the confusing use of BN in slpv1 tx building
Parents
rABC90cf70e1d2b8: [token-server] Test patch for tg admin bot msgs
Branches
Unknown
Tags
Unknown