wizard: make 'stack' private
This commit is contained in:
@@ -36,6 +36,7 @@ from electrum.gui.qt.util import *
|
||||
from electrum.gui.qt.qrcodewidget import QRCodeWidget
|
||||
from electrum.gui.qt.amountedit import AmountEdit
|
||||
from electrum.gui.qt.main_window import StatusBarButton
|
||||
from electrum.gui.qt.installwizard import InstallWizard
|
||||
from electrum.i18n import _
|
||||
from electrum.plugin import hook
|
||||
from electrum.util import PrintError, is_valid_email
|
||||
@@ -195,7 +196,7 @@ class Plugin(TrustedCoinPlugin):
|
||||
vbox.addLayout(Buttons(CloseButton(d)))
|
||||
d.exec_()
|
||||
|
||||
def go_online_dialog(self, wizard):
|
||||
def go_online_dialog(self, wizard: InstallWizard):
|
||||
msg = [
|
||||
_("Your wallet file is: {}.").format(os.path.abspath(wizard.storage.path)),
|
||||
_("You need to be online in order to complete the creation of "
|
||||
@@ -206,7 +207,7 @@ class Plugin(TrustedCoinPlugin):
|
||||
_('If you are online, click on "{}" to continue.').format(_('Next'))
|
||||
]
|
||||
msg = '\n\n'.join(msg)
|
||||
wizard.stack = []
|
||||
wizard.reset_stack()
|
||||
wizard.confirm_dialog(title='', message=msg, run_next = lambda x: wizard.run('accept_terms_of_use'))
|
||||
|
||||
def accept_terms_of_use(self, window):
|
||||
|
||||
@@ -48,6 +48,7 @@ from electrum.plugin import BasePlugin, hook
|
||||
from electrum.util import NotEnoughFunds, UserFacingException
|
||||
from electrum.storage import STO_EV_USER_PW
|
||||
from electrum.network import Network
|
||||
from electrum.base_wizard import BaseWizard
|
||||
|
||||
def get_signing_xpub(xtype):
|
||||
if not constants.net.TESTNET:
|
||||
@@ -491,9 +492,9 @@ class TrustedCoinPlugin(BasePlugin):
|
||||
def do_clear(self, window):
|
||||
window.wallet.is_billing = False
|
||||
|
||||
def show_disclaimer(self, wizard):
|
||||
def show_disclaimer(self, wizard: BaseWizard):
|
||||
wizard.set_icon('trustedcoin-wizard.png')
|
||||
wizard.stack = []
|
||||
wizard.reset_stack()
|
||||
wizard.confirm_dialog(title='Disclaimer', message='\n\n'.join(self.disclaimer_msg), run_next = lambda x: wizard.run('choose_seed'))
|
||||
|
||||
def choose_seed(self, wizard):
|
||||
@@ -580,9 +581,9 @@ class TrustedCoinPlugin(BasePlugin):
|
||||
f = lambda x: self.restore_choice(wizard, seed, x)
|
||||
wizard.passphrase_dialog(run_next=f) if is_ext else f('')
|
||||
|
||||
def restore_choice(self, wizard, seed, passphrase):
|
||||
def restore_choice(self, wizard: BaseWizard, seed, passphrase):
|
||||
wizard.set_icon('trustedcoin-wizard.png')
|
||||
wizard.stack = []
|
||||
wizard.reset_stack()
|
||||
title = _('Restore 2FA wallet')
|
||||
msg = ' '.join([
|
||||
'You are going to restore a wallet protected with two-factor authentication.',
|
||||
|
||||
Reference in New Issue
Block a user