qt: wizardcomponents all use Logger mixin. Fix missing self.plugins init in WCTrezorInitMethod
This commit is contained in:
@@ -221,9 +221,10 @@ class QENewWalletWizard(NewWalletWizard, QEAbstractWizard, MessageBoxMixin):
|
|||||||
on_finished()
|
on_finished()
|
||||||
|
|
||||||
|
|
||||||
class WCWalletName(WizardComponent):
|
class WCWalletName(WizardComponent, Logger):
|
||||||
def __init__(self, parent, wizard):
|
def __init__(self, parent, wizard):
|
||||||
WizardComponent.__init__(self, parent, wizard, title=_('Electrum wallet'))
|
WizardComponent.__init__(self, parent, wizard, title=_('Electrum wallet'))
|
||||||
|
Logger.__init__(self)
|
||||||
|
|
||||||
path = wizard._path
|
path = wizard._path
|
||||||
|
|
||||||
@@ -459,11 +460,10 @@ class WCConfirmSeed(WizardComponent):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class WCEnterExt(WizardComponent):
|
class WCEnterExt(WizardComponent, Logger):
|
||||||
_logger = get_logger(__name__)
|
|
||||||
|
|
||||||
def __init__(self, parent, wizard):
|
def __init__(self, parent, wizard):
|
||||||
WizardComponent.__init__(self, parent, wizard, title=_('Seed Extension'))
|
WizardComponent.__init__(self, parent, wizard, title=_('Seed Extension'))
|
||||||
|
Logger.__init__(self)
|
||||||
|
|
||||||
message = '\n'.join([
|
message = '\n'.join([
|
||||||
_('You may extend your seed with custom words.'),
|
_('You may extend your seed with custom words.'),
|
||||||
@@ -500,11 +500,11 @@ class WCEnterExt(WizardComponent):
|
|||||||
self.valid = True
|
self.valid = True
|
||||||
else:
|
else:
|
||||||
if self.wizard.has_duplicate_masterkeys(self.wizard_data):
|
if self.wizard.has_duplicate_masterkeys(self.wizard_data):
|
||||||
self._logger.debug('Duplicate master keys!')
|
self.logger.debug('Duplicate master keys!')
|
||||||
# TODO: user feedback
|
# TODO: user feedback
|
||||||
self.valid = False
|
self.valid = False
|
||||||
elif self.wizard.has_heterogeneous_masterkeys(self.wizard_data):
|
elif self.wizard.has_heterogeneous_masterkeys(self.wizard_data):
|
||||||
self._logger.debug('Heterogenous master keys!')
|
self.logger.debug('Heterogenous master keys!')
|
||||||
# TODO: user feedback
|
# TODO: user feedback
|
||||||
self.valid = False
|
self.valid = False
|
||||||
else:
|
else:
|
||||||
@@ -536,11 +536,11 @@ class WCConfirmExt(WizardComponent):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class WCHaveSeed(WizardComponent):
|
class WCHaveSeed(WizardComponent, Logger):
|
||||||
_logger = get_logger(__name__)
|
|
||||||
|
|
||||||
def __init__(self, parent, wizard):
|
def __init__(self, parent, wizard):
|
||||||
WizardComponent.__init__(self, parent, wizard, title=_('Enter Seed'))
|
WizardComponent.__init__(self, parent, wizard, title=_('Enter Seed'))
|
||||||
|
Logger.__init__(self)
|
||||||
|
|
||||||
self.layout().addWidget(WWLabel(_('Please enter your seed phrase in order to restore your wallet.')))
|
self.layout().addWidget(WWLabel(_('Please enter your seed phrase in order to restore your wallet.')))
|
||||||
|
|
||||||
# TODO: SeedLayout assumes too much in parent, refactor SeedLayout
|
# TODO: SeedLayout assumes too much in parent, refactor SeedLayout
|
||||||
@@ -594,11 +594,11 @@ class WCHaveSeed(WizardComponent):
|
|||||||
else:
|
else:
|
||||||
self.apply()
|
self.apply()
|
||||||
if self.wizard.has_duplicate_masterkeys(self.wizard_data):
|
if self.wizard.has_duplicate_masterkeys(self.wizard_data):
|
||||||
self._logger.debug('Duplicate master keys!')
|
self.logger.debug('Duplicate master keys!')
|
||||||
# TODO: user feedback
|
# TODO: user feedback
|
||||||
seed_valid = False
|
seed_valid = False
|
||||||
elif self.wizard.has_heterogeneous_masterkeys(self.wizard_data):
|
elif self.wizard.has_heterogeneous_masterkeys(self.wizard_data):
|
||||||
self._logger.debug('Heterogenous master keys!')
|
self.logger.debug('Heterogenous master keys!')
|
||||||
# TODO: user feedback
|
# TODO: user feedback
|
||||||
seed_valid = False
|
seed_valid = False
|
||||||
|
|
||||||
@@ -617,11 +617,10 @@ class WCHaveSeed(WizardComponent):
|
|||||||
cosigner_data['seed_extra_words'] = '' # empty default
|
cosigner_data['seed_extra_words'] = '' # empty default
|
||||||
|
|
||||||
|
|
||||||
class WCScriptAndDerivation(WizardComponent):
|
class WCScriptAndDerivation(WizardComponent, Logger):
|
||||||
_logger = get_logger(__name__)
|
|
||||||
|
|
||||||
def __init__(self, parent, wizard):
|
def __init__(self, parent, wizard):
|
||||||
WizardComponent.__init__(self, parent, wizard, title=_('Script type and Derivation path'))
|
WizardComponent.__init__(self, parent, wizard, title=_('Script type and Derivation path'))
|
||||||
|
Logger.__init__(self)
|
||||||
|
|
||||||
def on_ready(self):
|
def on_ready(self):
|
||||||
message1 = _('Choose the type of addresses in your wallet.')
|
message1 = _('Choose the type of addresses in your wallet.')
|
||||||
|
|||||||
@@ -815,6 +815,7 @@ class WCTrezorInitMethod(WizardComponent, Logger):
|
|||||||
def __init__(self, parent, wizard):
|
def __init__(self, parent, wizard):
|
||||||
WizardComponent.__init__(self, parent, wizard, title=_('HW Setup'))
|
WizardComponent.__init__(self, parent, wizard, title=_('HW Setup'))
|
||||||
Logger.__init__(self)
|
Logger.__init__(self)
|
||||||
|
self.plugins = wizard.plugins
|
||||||
self.plugin = None
|
self.plugin = None
|
||||||
|
|
||||||
def on_ready(self):
|
def on_ready(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user