You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(platform-wallet): map NoUtxosAvailable to the typed asset-lock insufficient-funds error
Addresses carried review finding prior-no-utxos-846 on dashpay#4074.
The union-funding coin selector returns SelectionError::NoUtxosAvailable when
filtering leaves zero spendable candidates — the most extreme shortfall — but
map_builder_error only promoted the two InsufficientFunds variants to the typed
PlatformWalletError::AssetLockInsufficientFunds, so the empty candidate set fell
through to the generic AssetLockTransaction(String) while partial shortfalls
stayed typed. Hosts then had to string-match to recognize the zero-funds case.
NoUtxosAvailable carries no amounts, so map_builder_error now takes the caller's
requested target and maps this case to AssetLockInsufficientFunds { available: 0,
required: requested }, keeping the empty set on the same structured shortfall
contract dashpay#4073 introduced. Carried InsufficientFunds amounts still win over the
requested arg. No third_party changes. Unit test covers both mappings.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments