HomePhabricator

[Cashtab] [Chronik] [Tx Gen] Generate Tx Input

Description

[Cashtab] [Chronik] [Tx Gen] Generate Tx Input

Summary:
Supersedes D11639

Updates since D11639:

  • removed '--forceExit' test script flag from package.json
  • removed totalInputUtxoValue (formerly originalAmount) as an input param and instead instantiated as BigNumber 0 within the function and subsequently returned in the response object
  • updated unit tests to reflect variable name change to totalInputUtxoValue

As per T2503, this is part of a series of diffs to refactor the transaction generation process within useBCH.

This diff is a standalone utility function which collates enough utxos for the active wallet to cover the sats being sent in an XEC tx and adds each utxo as an input onto the transaction builder instance and inputUtxos array, including fee calculation.

Test Plan:
npm test
observe successful execution of generateTxInput() unit tests

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
emackAuthored on Jun 21 2022, 07:09
emackPushed on Jul 13 2022, 13:56
Reviewer
Restricted Project
Differential Revision
D11645: [Cashtab] [Chronik] [Tx Gen] Generate Tx Input
Parents
rABC4d6d1cb9ca3c: use local chainman in peermanager_tests
Branches
Unknown
Tags
Unknown