HomePhabricator

[Cashtab] [Chronik] [Tx Gen] Get change address from input UTXOs

Description

[Cashtab] [Chronik] [Tx Gen] Get change address from input UTXOs

Summary:
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 parses the input UTXOs for the address at element 0. If that particular address is invalid, then the function falls back onto the wallet's Path1899 cash address.

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

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
emackAuthored on Jul 5 2022, 07:19
emackPushed on Jul 13 2022, 12:55
Reviewer
Restricted Project
Differential Revision
D11712: [Cashtab] [Chronik] [Tx Gen] Get change address from input UTXOs
Parents
rABC6c5a3dd84f6a: [Cashtab] [Chronik] [Tx Gen] Parse XEC send value
Branches
Unknown
Tags
Unknown