Skip to content

Commit 8420204

Browse files
committed
do nothing if wallet is loaded
1 parent de4bb3f commit 8420204

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
@@ -562,6 +562,9 @@ impl WalletManager {
562562
}
563563

564564
pub async fn load_wallet(&self, name: &str) -> anyhow::Result<()> {
565+
if self.wallets.read().await.contains_key(name) {
566+
return Ok(());
567+
}
565568
let wallet_dir = self.data_dir.join(name);
566569
if !wallet_dir.exists() {
567570
return Err(anyhow!("Wallet does not exist"));

0 commit comments

Comments
 (0)