Skip to content

Commit

Permalink
fix wallet mutex lock
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedberg committed Oct 11, 2024
1 parent 84be758 commit 7d866b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rgb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,9 @@ impl ChangeDestinationSource for RgbLibWalletWrapper {

impl WalletSource for RgbLibWalletWrapper {
fn list_confirmed_utxos(&self) -> Result<Vec<Utxo>, ()> {
let wallet = self.wallet.lock().unwrap();
let network =
Network::from_str(&self.bitcoin_network().to_string().to_lowercase()).unwrap();
let wallet = self.wallet.lock().unwrap();
Ok(wallet.list_unspents_vanilla(self.online.clone(), 1, false).unwrap().iter().filter_map(|u| {
let script = u.txout.script_pubkey.clone().into_boxed_script();
let address = Address::from_script(&script, network).unwrap();
Expand Down

0 comments on commit 7d866b8

Please sign in to comment.