From 31b1ac1a3e345261c91cb8b46601bb133b5328c3 Mon Sep 17 00:00:00 2001 From: asdf Date: Mon, 16 Aug 2021 22:59:20 +0900 Subject: [PATCH] Clearing a variable of list for instances of the Account class --- monero/wallet.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/monero/wallet.py b/monero/wallet.py index 9de4b7c..cd29008 100644 --- a/monero/wallet.py +++ b/monero/wallet.py @@ -80,6 +80,9 @@ class Wallet(object): self._backend.open_wallet(filename) else: self._backend.open_wallet(filename, password) + + if type(self.accounts) is list: + self.accounts.clear() self.refresh() @@ -106,6 +109,9 @@ class Wallet(object): self._backend.create_new_wallet(filename) else: self._backend.create_new_wallet(filename, password) + + if type(self.accounts) is list: + self.accounts.clear() self.refresh()