Browse Source

qt: automatically proceed wizard when unlocking existing wallet or succesful retrieve of xpub

for new wallet
master
Sander van Grieken 2 years ago
parent
commit
d4d57c3aef
  1. 6
      electrum/gui/qt/wizard/wallet.py
  2. 4
      electrum/gui/qt/wizard/wizard.py

6
electrum/gui/qt/wizard/wallet.py

@ -1228,6 +1228,9 @@ class WCHWUnlock(WizardComponent, Logger):
else:
self.valid = False
if self.valid:
self.wizard.requestNext.emit() # via signal, so it triggers Next/Finish on GUI thread after on_updated()
def apply(self):
if self.valid:
self.wizard_data['password'] = self.password
@ -1302,6 +1305,9 @@ class WCHWXPub(WizardComponent, Logger):
else:
self.valid = False
if self.valid:
self.wizard.requestNext.emit() # via signal, so it triggers Next/Finish on GUI thread after on_updated()
def apply(self):
_name, _info = self.wizard_data['hardware_device']
cosigner_data = self.wizard.current_cosigner(self.wizard_data)

4
electrum/gui/qt/wizard/wizard.py

@ -21,6 +21,8 @@ if TYPE_CHECKING:
class QEAbstractWizard(QDialog, MessageBoxMixin):
_logger = get_logger(__name__)
requestNext = pyqtSignal()
def __init__(self, config: 'SimpleConfig', app: 'QElectrumApplication', *, start_viewstate: 'WizardViewState' = None):
QDialog.__init__(self, None)
self.app = app
@ -40,7 +42,7 @@ class QEAbstractWizard(QDialog, MessageBoxMixin):
self.next_button = QPushButton(_("Next"), self)
self.next_button.clicked.connect(self.on_next_button_clicked)
self.next_button.setDefault(True)
self.requestNext.connect(self.on_next_button_clicked)
self.logo = QLabel()
please_wait_layout = QVBoxLayout()

Loading…
Cancel
Save