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.
The function returns an object containing the transaction builder instance, the originalAmount (total utxo values), txFee and inputUtxos array.