HomePhabricator

[ecash-wallet] Make sure that no specification of isMintBaton is treated the…

Description

[ecash-wallet] Make sure that no specification of isMintBaton is treated the same as specifying false for isMintBaton

Summary:
Typescript allows token outputs without the isMintBaton key. However, when this happens, the logic is not necessarily parsing this the same as isMintBaton: false

imo it is nice to allow users to not specify isMintBaton since most token send actions do not involve mint batons. But we need to specify isMintBaton: true when something is a mint baton.

Update the logic to reflect this. This corrects a bug where token send atom arrays could be incorrectly calculated if a user forgets to include isMintBaton: false in token outputs that are not mint batons. Otherwise no expected change in behavior.

Test Plan: npm test and CI tests

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details