Browse Source

qml/qedaemon.py: don't use daemon._wallets field directly

it's more robust to use the public methods
master
SomberNight 2 years ago
parent
commit
0d29733419
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 5
      electrum/gui/qml/qedaemon.py

5
electrum/gui/qml/qedaemon.py

@ -180,7 +180,7 @@ class QEDaemon(AuthMixin, QObject):
if not password:
password = self._password
wallet_already_open = self._path in self.daemon._wallets
wallet_already_open = self.daemon.get_wallet(self._path) is not None
if not wallet_already_open:
# pre-checks, let walletdb trigger any necessary user interactions
@ -234,7 +234,8 @@ class QEDaemon(AuthMixin, QObject):
@pyqtSlot(str)
def _on_backend_wallet_loaded(self, password = None):
self._logger.debug('_on_backend_wallet_loaded')
wallet = self.daemon._wallets[self._path]
wallet = self.daemon.get_wallet(self._path)
assert wallet is not None
self._current_wallet = QEWallet.getInstanceFor(wallet)
self.availableWallets.updateWallet(self._path)
self._current_wallet.password = password if password else None

Loading…
Cancel
Save