1
0

qml: multisig wizard; cosigner w. electrum seed

This commit is contained in:
Sander van Grieken
2022-11-08 17:43:42 +01:00
parent 5246f3d510
commit 428ba209f4
6 changed files with 86 additions and 16 deletions

View File

@@ -173,10 +173,12 @@ class NewWalletWizard(AbstractWizard):
'next': self.on_cosigner_keystore_type
},
'multisig_cosigner_key': {
'next': 'multisig_cosigner_keystore' # TODO
'next': lambda d: 'multisig_cosigner_keystore' if self.has_all_cosigner_data(d) else 'wallet_password',
'last': lambda v,d: self.is_single_password() and self.has_all_cosigner_data(d)
},
'multisig_cosigner_seed': {
'next': 'multisig_cosigner_keystore' # TODO
'next': lambda d: 'multisig_cosigner_keystore' if self.has_all_cosigner_data(d) else 'wallet_password',
'last': lambda v,d: self.is_single_password() and self.has_all_cosigner_data(d)
},
'imported': {
'next': 'wallet_password',
@@ -234,6 +236,9 @@ class NewWalletWizard(AbstractWizard):
'seed': 'multisig_cosigner_seed'
}.get(t)
def has_all_cosigner_data(self, wizard_data):
return len(wizard_data['multisig_cosigner_data']) < (wizard_data['multisig_participants'] - 1)
def finished(self, wizard_data):
self._logger.debug('finished')
# override