Skip to content

Commit

Permalink
chore: update dependencies patches to use master branches
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Sep 5, 2024
2 parents c1ed340 + 3bce0f2 commit ba4c5ec
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -862,21 +862,18 @@ impl Exec for RgbArgs {
// TODO: Support lock time and RBFs
let params = TransferParams::with(*fee, *sats);

let (psbt, _, transfer) =
let (mut psbt, _, transfer) =
wallet.pay(invoice, params).map_err(|err| err.to_string())?;

transfer.save_file(out_file)?;

let ver = if *v2 { PsbtVer::V2 } else { PsbtVer::V0 };
psbt.version = if *v2 { PsbtVer::V2 } else { PsbtVer::V0 };
match psbt_file {
Some(file_name) => {
let mut psbt_file = File::create(file_name)?;
psbt.encode(ver, &mut psbt_file)?;
psbt.encode(psbt.version, &mut psbt_file)?;
}
None => match ver {
PsbtVer::V0 => println!("{psbt}"),
PsbtVer::V2 => println!("{psbt:#}"),
},
None => println!("{psbt}"),
}
}
Command::Inspect { file, dir, path } => {
Expand Down
2 changes: 1 addition & 1 deletion src/indexers/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::{Txid, XChain};

// We need to repeat methods of `WitnessResolve` trait here to avoid making
// wrappers around resolver types. TODO: Use wrappers instead
pub trait RgbResolver {
pub trait RgbResolver: Send {
fn check(&self, network: Network, expected_block_hash: String) -> Result<(), String>;
fn resolve_pub_witness(&self, txid: Txid) -> Result<Option<Tx>, String>;
fn resolve_pub_witness_ord(&self, txid: Txid) -> Result<WitnessOrd, String>;
Expand Down
6 changes: 4 additions & 2 deletions src/indexers/esplora_blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ impl RgbResolver for BlockingClient {
}

fn resolve_pub_witness_ord(&self, txid: Txid) -> Result<WitnessOrd, String> {
if self.tx(&txid)?.is_none() {
return Ok(WitnessOrd::Archived);
}
let status = self.tx_status(&txid)?;
let ord = match status
.block_height
Expand All @@ -46,8 +49,7 @@ impl RgbResolver for BlockingClient {
Some((h, t)) => {
WitnessOrd::Mined(WitnessPos::new(h, t as i64).ok_or(Error::InvalidServerData)?)
}
// TODO: Figure out how to detect mempool transactions
None => WitnessOrd::Archived,
None => WitnessOrd::Tentative,
};
Ok(ord)
}
Expand Down
4 changes: 2 additions & 2 deletions src/pay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ where Self::Descr: DescriptorRgb<K>
pay2vout.method,
Outpoint::new(witness_txid, vout),
));
(vec![], vec![seal])
(None, vec![seal])
}
Beneficiary::BlindedSeal(seal) => (vec![XChain::Bitcoin(seal)], vec![]),
Beneficiary::BlindedSeal(seal) => (Some(XChain::Bitcoin(seal)), vec![]),
};

struct FasciaResolver {
Expand Down

0 comments on commit ba4c5ec

Please sign in to comment.