Skip to content

Commit

Permalink
Fix testnet path when deleting wallet on node (#2395)
Browse files Browse the repository at this point in the history
  • Loading branch information
moneymanolis authored Nov 14, 2023
1 parent 3301acc commit b85cf74
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/cryptoadvance/specter/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,12 @@ def delete_wallet_file(self, wallet) -> bool:
)
except RpcError:
pass
if self.chain != "main":
path = os.path.join(datadir, f"{self.chain}/wallets", wallet_rpc_path)
else:
if self.chain == "test":
path = os.path.join(datadir, "testnet3/wallets", wallet_rpc_path)
elif self.chain == "main":
path = os.path.join(datadir, wallet_rpc_path)
else:
path = os.path.join(datadir, f"{self.chain}/wallets", wallet_rpc_path)
try:
shutil.rmtree(path, ignore_errors=False)
logger.debug(f"Removing wallet file at: {path}")
Expand Down

0 comments on commit b85cf74

Please sign in to comment.