Browse Source

properly remember wallet password and pass to tx signing call

patch-4
Sander van Grieken 2 years ago
parent
commit
e579f5b8a5
  1. 9
      electrum/gui/qml/qedaemon.py
  2. 5
      electrum/gui/qml/qewallet.py

9
electrum/gui/qml/qedaemon.py

@ -161,7 +161,9 @@ class QEDaemon(AuthMixin, QObject):
if not password:
password = self._password
if self._path not in self.daemon._wallets:
wallet_already_open = self._path in self.daemon._wallets
if not wallet_already_open:
# pre-checks, let walletdb trigger any necessary user interactions
self._walletdb.path = self._path
self._walletdb.password = password
@ -172,9 +174,10 @@ class QEDaemon(AuthMixin, QObject):
try:
wallet = self.daemon.load_wallet(self._path, password)
if wallet != None:
self._loaded_wallets.add_wallet(wallet_path=self._path, wallet=wallet)
self._current_wallet = QEWallet.getInstanceFor(wallet)
self._current_wallet.password = password
if not wallet_already_open:
self._loaded_wallets.add_wallet(wallet_path=self._path, wallet=wallet)
self._current_wallet.password = password
self.walletLoaded.emit()
if self.daemon.config.get('single_password'):

5
electrum/gui/qml/qewallet.py

@ -554,7 +554,10 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
addr = None
if self.wallet.config.get('bolt11_fallback', True):
addr = self.wallet.get_unused_address()
# if addr is None, we ran out of addresses. for lightning enabled wallets, ignore for now
# if addr is None, we ran out of addresses
if addr is None:
# TODO: remove oldest unpaid request having a fallback address and try again
pass
key = self.wallet.create_request(None, None, default_expiry, addr)
else:
key, addr = self.create_bitcoin_request(None, None, default_expiry, ignore_gap)

Loading…
Cancel
Save