Skip to content

Commit

Permalink
demo cli
Browse files Browse the repository at this point in the history
  • Loading branch information
cylewitruk committed Oct 10, 2024
1 parent e9a7541 commit 84f5f21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions signer/src/bin/demo_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use secp256k1::PublicKey;
use signer::config::Settings;

#[derive(Debug, thiserror::Error)]
#[allow(clippy::enum_variant_names)]
enum Error {
#[error("Signer error: {0}")]
SignerError(#[from] signer::error::Error),
Expand Down Expand Up @@ -132,7 +133,7 @@ async fn exec_deposit(
let txid = unsigned_tx.compute_txid();

let emily_deposit = deposit_api::create_deposit(
&emily_config,
emily_config,
CreateDepositRequestBody {
bitcoin_tx_output_index: 1,
bitcoin_txid: txid.to_string(),
Expand Down Expand Up @@ -177,7 +178,7 @@ fn create_bitcoin_deposit_transaction(
let unspent = client
.list_unspent(Some(6), None, None, None, Some(opts))?
.into_iter()
.nth(0)
.next()
.ok_or(Error::NoAvailableUtxos)?;

// Get a new address for change (SegWit)
Expand All @@ -186,7 +187,7 @@ fn create_bitcoin_deposit_transaction(
.require_network(Network::Regtest)?;

// Create the unsigned transaction
let mut unsigned_tx = Transaction {
let unsigned_tx = Transaction {
input: vec![TxIn {
previous_output: OutPoint {
txid: unspent.txid,
Expand Down

0 comments on commit 84f5f21

Please sign in to comment.