Skip to content

Commit

Permalink
Fix issue with --satpoint when offset not 0 (#2466)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipelincoln authored Sep 25, 2023
1 parent fba0656 commit 41aeb0a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/subcommand/wallet/inscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,14 @@ impl Inscribe {

let commit = client.send_raw_transaction(&signed_commit_tx)?;

let reveal = client
.send_raw_transaction(&signed_reveal_tx)
.context("Failed to send reveal transaction")?;
let reveal = match client.send_raw_transaction(&signed_reveal_tx) {
Ok(txid) => txid,
Err(err) => {
return Err(anyhow!(
"Failed to send reveal transaction: {err}\nCommit tx {commit} will be recovered once mined"
))
}
};

Ok(Box::new(Output {
commit,
Expand Down Expand Up @@ -368,7 +373,7 @@ impl Inscribe {
bail!("commit transaction output would be dust");
}

let mut prevouts = vec![unsigned_commit_tx.output[0].clone()];
let mut prevouts = vec![unsigned_commit_tx.output[vout].clone()];

if let Some(parent_info) = parent_info {
prevouts.insert(0, parent_info.tx_out);
Expand Down

0 comments on commit 41aeb0a

Please sign in to comment.