Skip to content

Commit 33f6c96

Browse files
authored
Merge pull request #89 from Ximik/fix-listwallets
Fix list_wallets for no wallets
2 parents 612970d + 89f4af5 commit 33f6c96

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/src/rpc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,9 @@ impl WalletManager {
579579
}
580580

581581
pub async fn list_wallets(&self) -> anyhow::Result<Vec<String>> {
582+
if !self.data_dir.exists() {
583+
return Ok(vec![]);
584+
}
582585
let wallets = std::fs::read_dir(&self.data_dir)?
583586
.filter_map(Result::ok)
584587
.filter(|entry| entry.path().is_dir())

0 commit comments

Comments
 (0)