Page MenuHomePhabricator

[ecash-wallet] Return the sats selection strategy used to selectUtxos from the selectUtxos method
ClosedPublic

Authored by bytesofman on Mon, Oct 27, 17:51.

Details

Summary

The sats selection strategy used to select utxos cannot necessarily be inferred. There is at least one edge case where we have 0 missing sats but still cannot cover the fee, i.e. when we are attempting to send 1 token utxo to 1 output (also a token utxo).

If we do not specify that this came from a NO_SATS strategy, the build() function will see it and do what it is designed to do, add some fuel utxos and build the tx.

But in this case, we specifically do not want to add fuel utxos, as we selected the NO_SATS strategy.

So, return the sats selection strategy used to select utxos. In this way it is available for tx building functions to appropriately parse.

Test Plan

npm test, CI for integration tests