anchor channels: unlock wallet on startup if the wallet has channels
This commit is contained in:
@@ -251,7 +251,8 @@ class QEDaemon(AuthMixin, QObject):
|
||||
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
|
||||
if wallet.requires_unlock():
|
||||
wallet.unlock(password)
|
||||
self._loading = False
|
||||
self.loadingChanged.emit()
|
||||
self.walletLoaded.emit(self._name, self._path)
|
||||
|
||||
@@ -731,12 +731,16 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
||||
try:
|
||||
self._logger.info('setting new password')
|
||||
self.wallet.update_password(current_password, password, encrypt_storage=True)
|
||||
self.password = password
|
||||
self.wallet.unlock(password)
|
||||
return True
|
||||
except InvalidPassword as e:
|
||||
self._logger.exception(repr(e))
|
||||
return False
|
||||
|
||||
@property
|
||||
def password(self):
|
||||
return self.wallet.get_unlocked_password()
|
||||
|
||||
@pyqtSlot(str)
|
||||
def importAddresses(self, addresslist):
|
||||
self.wallet.import_addresses(addresslist.split())
|
||||
|
||||
Reference in New Issue
Block a user