Skip to content

Commit 795e707

Browse files
committed
feat(create-tx): handle bdk_wallet::tx_builder::AddUtxoError::UnknownUtxo
1 parent 38abbdd commit 795e707

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/handlers.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,9 @@ pub fn handle_offline_wallet_subcommand(
527527
}
528528

529529
if let Some(utxos) = utxos {
530-
tx_builder.add_utxos(&utxos[..]).unwrap();
530+
tx_builder
531+
.add_utxos(&utxos[..])
532+
.map_err(|_| bdk_wallet::error::CreateTxError::UnknownUtxo)?;
531533
}
532534

533535
if let Some(unspendable) = unspendable {

0 commit comments

Comments
 (0)