1
0

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

for new wallet
This commit is contained in:
Sander van Grieken
2023-09-07 17:12:39 +02:00
parent f7b34003cc
commit d4d57c3aef
2 changed files with 9 additions and 1 deletions

View File

@@ -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)

View File

@@ -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()