diff --git a/ports/stm32/boards/Passport/modules/new_wallet.py b/ports/stm32/boards/Passport/modules/new_wallet.py index beff2b8..54297ea 100644 --- a/ports/stm32/boards/Passport/modules/new_wallet.py +++ b/ports/stm32/boards/Passport/modules/new_wallet.py @@ -391,6 +391,17 @@ class NewWalletUX(UXStateMachine): elif method == 'show_addresses': self.goto(self.SHOW_RX_ADDRESSES_VERIFICATION_INTRO, save_curr=save_curr) + def choose_multisig_import_mode(self): + if 'mulitsig_import_mode' in self.export_mode: + if self.export_mode['mulitsig_import_mode'] == EXPORT_MODE_QR: + self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_QR, save_curr=False) + else: + self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_MICROSD, save_curr=False) + elif self.export_mode['id'] == EXPORT_MODE_QR: + self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_QR, save_curr=False) + else: + self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_MICROSD, save_curr=False) + async def show(self): while True: # print('show: state={}'.format(self.state)) @@ -541,7 +552,7 @@ class NewWalletUX(UXStateMachine): # If multisig, we need to import the quorum/config info first, else go right to validating the first # receive address from the wallet. if self.is_multisig(): - self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_QR, save_curr=False) + self.choose_multisig_import_mode() else: self.goto_address_verification_method(save_curr=False) @@ -598,11 +609,10 @@ class NewWalletUX(UXStateMachine): # If multisig, we need to import the quorum/config info first, else go right to validating the first # receive address from the wallet. if self.is_multisig(): - self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_MICROSD, save_curr=False) + self.choose_multisig_import_mode() else: self.goto_address_verification_method(save_curr=False) - elif self.state == self.IMPORT_MULTISIG_CONFIG_FROM_QR: while True: msg = self.get_custom_text('multisig_import_qr', 'Next, import the multisig configuration from {} via QR code.'.format(self.sw_wallet['label'])) @@ -831,10 +841,7 @@ Compare them with the addresses shown on the next screen to make sure they match if self.is_multisig(): if not self.multisig_wallet: # Need to import the multisig wallet - if self.export_mode['id'] == 'qr': - self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_QR) - else: - self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_MICROSD) + self.choose_multisig_import_mode() continue if not self.verified: diff --git a/ports/stm32/boards/Passport/modules/wallets/casa.py b/ports/stm32/boards/Passport/modules/wallets/casa.py index 7f6453c..4bd577c 100644 --- a/ports/stm32/boards/Passport/modules/wallets/casa.py +++ b/ports/stm32/boards/Passport/modules/wallets/casa.py @@ -55,6 +55,6 @@ CasaWallet = { ], 'export_modes': [ {'id': 'microsd', 'label': 'microSD', 'filename_pattern': '{sd}/{xfp}-casa.txt', 'ext': '.txt', - 'filename_pattern_multisig': '{sd}/{xfp}-casa-multisig.json', 'ext_multisig': '.txt',} + 'filename_pattern_multisig': '{sd}/{xfp}-casa-multisig.json', 'ext_multisig': '.txt'} ] } diff --git a/ports/stm32/boards/Passport/modules/wallets/specter.py b/ports/stm32/boards/Passport/modules/wallets/specter.py index 4c58bb2..da67e8d 100644 --- a/ports/stm32/boards/Passport/modules/wallets/specter.py +++ b/ports/stm32/boards/Passport/modules/wallets/specter.py @@ -18,7 +18,7 @@ SpecterWallet = { 'import_qr': read_multisig_config_from_qr, 'import_microsd': read_multisig_config_from_microsd} ], 'export_modes': [ - # {'id': 'qr', 'label': 'QR Code', 'qr_type': QRType.UR1}, - {'id': 'microsd', 'label': 'microSD', 'filename_pattern': '{sd}/{xfp}-specter.json', 'filename_pattern_multisig': '{sd}/{xfp}-specter-multisig.json'} + {'id': 'qr', 'label': 'QR Code', 'qr_type': QRType.UR2}, + {'id': 'microsd', 'label': 'microSD', 'filename_pattern': '{sd}/{xfp}-specter.json', 'filename_pattern_multisig': '{sd}/{xfp}-specter-multisig.json', 'mulitsig_import_mode': 'qr'} ] } diff --git a/ports/stm32/boards/Passport/modules/wallets/sw_wallets.py b/ports/stm32/boards/Passport/modules/wallets/sw_wallets.py index fb8e1c5..b75a3b3 100644 --- a/ports/stm32/boards/Passport/modules/wallets/sw_wallets.py +++ b/ports/stm32/boards/Passport/modules/wallets/sw_wallets.py @@ -32,6 +32,6 @@ supported_software_wallets = [ # GordianWallet, # LilyWallet, SparrowWallet, - # SpecterWallet, + SpecterWallet, WasabiWallet, ]