Browse Source

PASS1-136: Add Specter wallet back once they fix UR issues (#44)

* PASS1-136: Add Specter wallet back once they fix UR issues

* Rebase onto dev-v1.0.7

* Remove passport from export filename

* Remove flag from all wallets besides Specter wallet

* Removed flag from unnecessary field and renamed flag to import

* Renamed multisig_import function
PASS1-112
Corey Lakey 4 years ago
committed by GitHub
parent
commit
1dc4bc317c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      ports/stm32/boards/Passport/modules/new_wallet.py
  2. 2
      ports/stm32/boards/Passport/modules/wallets/casa.py
  3. 4
      ports/stm32/boards/Passport/modules/wallets/specter.py
  4. 2
      ports/stm32/boards/Passport/modules/wallets/sw_wallets.py

21
ports/stm32/boards/Passport/modules/new_wallet.py

@ -391,6 +391,17 @@ class NewWalletUX(UXStateMachine):
elif method == 'show_addresses': elif method == 'show_addresses':
self.goto(self.SHOW_RX_ADDRESSES_VERIFICATION_INTRO, save_curr=save_curr) 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): async def show(self):
while True: while True:
# print('show: state={}'.format(self.state)) # 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 # If multisig, we need to import the quorum/config info first, else go right to validating the first
# receive address from the wallet. # receive address from the wallet.
if self.is_multisig(): if self.is_multisig():
self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_QR, save_curr=False) self.choose_multisig_import_mode()
else: else:
self.goto_address_verification_method(save_curr=False) 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 # If multisig, we need to import the quorum/config info first, else go right to validating the first
# receive address from the wallet. # receive address from the wallet.
if self.is_multisig(): if self.is_multisig():
self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_MICROSD, save_curr=False) self.choose_multisig_import_mode()
else: else:
self.goto_address_verification_method(save_curr=False) self.goto_address_verification_method(save_curr=False)
elif self.state == self.IMPORT_MULTISIG_CONFIG_FROM_QR: elif self.state == self.IMPORT_MULTISIG_CONFIG_FROM_QR:
while True: while True:
msg = self.get_custom_text('multisig_import_qr', 'Next, import the multisig configuration from {} via QR code.'.format(self.sw_wallet['label'])) 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 self.is_multisig():
if not self.multisig_wallet: if not self.multisig_wallet:
# Need to import the multisig wallet # Need to import the multisig wallet
if self.export_mode['id'] == 'qr': self.choose_multisig_import_mode()
self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_QR)
else:
self.goto(self.IMPORT_MULTISIG_CONFIG_FROM_MICROSD)
continue continue
if not self.verified: if not self.verified:

2
ports/stm32/boards/Passport/modules/wallets/casa.py

@ -55,6 +55,6 @@ CasaWallet = {
], ],
'export_modes': [ 'export_modes': [
{'id': 'microsd', 'label': 'microSD', 'filename_pattern': '{sd}/{xfp}-casa.txt', 'ext': '.txt', {'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'}
] ]
} }

4
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} 'import_qr': read_multisig_config_from_qr, 'import_microsd': read_multisig_config_from_microsd}
], ],
'export_modes': [ 'export_modes': [
# {'id': 'qr', 'label': 'QR Code', 'qr_type': QRType.UR1}, {'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'} {'id': 'microsd', 'label': 'microSD', 'filename_pattern': '{sd}/{xfp}-specter.json', 'filename_pattern_multisig': '{sd}/{xfp}-specter-multisig.json', 'mulitsig_import_mode': 'qr'}
] ]
} }

2
ports/stm32/boards/Passport/modules/wallets/sw_wallets.py

@ -32,6 +32,6 @@ supported_software_wallets = [
# GordianWallet, # GordianWallet,
# LilyWallet, # LilyWallet,
SparrowWallet, SparrowWallet,
# SpecterWallet, SpecterWallet,
WasabiWallet, WasabiWallet,
] ]

Loading…
Cancel
Save