zcash-android-wallet-sdk
zcash-android-wallet-sdk copied to clipboard
WalletTransactionEncoder - createShieldingSpend() - improve implementation
Is your feature request related to a problem? Please describe.
Filling an additional issue to provide a link to the code base TODO occurrence.
We'd like to enhance try/catch in WalletTransactionEncoder#createShieldingSpend
to: If this error matches: Insufficient balance (have 0, need 1000 including fee) then consider custom error that says no UTXOs existed to shield
We are now doing this in the new TransactionEncoder.proposeShielding
method by returning Proposal?
, with null
meaning either there were no UTXOs to shield, or the balance to shield was below the shielding threshold. createShieldingSpend
will be removed in 2.1.0 as its corresponding Synchronizer
method is being deprecated.
If this error matches: Insufficient balance (have 0, need 1000 including fee) then consider custom error that says no UTXOs existed to shield.
That is dependent on the pre-ZIP-317 fee amount. In general it is fragile to match on error strings.