Skip to content

Commit

Permalink
Hotfix for no loaded wallets (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
otaliptus authored May 15, 2024
1 parent d147e1c commit be0c5ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion crates/bitcoin-da/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ impl BitcoinNode {
}

pub async fn list_wallets(&self) -> Result<Vec<String>, anyhow::Error> {
self.call::<Vec<String>>("listwallets", vec![]).await
let res = self.call::<Vec<String>>("listwallets", vec![]).await;
match res {
Ok(wallets) => Ok(wallets),
Err(_) => Ok(vec![]),
}
}
}
2 changes: 1 addition & 1 deletion crates/bitcoin-da/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl BitcoinService {
.expect("Failed to list loaded wallets");

if wallets.is_empty() {
panic!("No loaded wallet found!");
tracing::warn!("No loaded wallet found!");
}

Self {
Expand Down

0 comments on commit be0c5ae

Please sign in to comment.