diff --git a/shared/address_explorer.py b/shared/address_explorer.py index ff144cbf..dd33636f 100644 --- a/shared/address_explorer.py +++ b/shared/address_explorer.py @@ -15,7 +15,7 @@ from uhashlib import sha256 from ubinascii import hexlify as b2a_hex from glob import settings from auth import write_sig_file -from utils import addr_fmt_label +from utils import addr_fmt_label, censor_address from charcodes import KEY_QR, KEY_NFC, KEY_PAGE_UP, KEY_PAGE_DOWN, KEY_HOME, KEY_LEFT, KEY_RIGHT from charcodes import KEY_CANCEL @@ -286,7 +286,7 @@ Press (3) if you really understand and accept these risks. # - converts into addr # - assumes 0/0 is first address. for (i, addr, paths, script) in ms_wallet.yield_addresses(start, n, change_idx=change): - addrs.append(addr) + addrs.append(censor_address(addr)) if i == 0 and ms_wallet.N <= 4: msg += '\n'.join(paths) + '\n =>\n' @@ -384,7 +384,6 @@ def generate_address_csv(path, addr_fmt, ms_wallet, account_num, n, start=0, cha # Produce CSV file contents as a generator # - maybe cache internally from ownership import OWNERSHIP - from utils import censor_address if ms_wallet: # For multisig, include redeem script and derivation for each signer diff --git a/testing/test_bbqr.py b/testing/test_bbqr.py index b2d9bd69..20d56891 100644 --- a/testing/test_bbqr.py +++ b/testing/test_bbqr.py @@ -91,7 +91,10 @@ def readback_bbqr(readback_bbqr_ll): # - but might be text too try: rb = a2b_hex(parts) - file_type = 'T' + if rb[0:5] == b'psbt\xff': + file_type = 'P' + else: + file_type = 'T' except: if parts[0] == '{' and parts[-1] == '}': file_type = 'J' diff --git a/testing/test_se2.py b/testing/test_se2.py index 355fcf91..34d58acf 100644 --- a/testing/test_se2.py +++ b/testing/test_se2.py @@ -175,10 +175,8 @@ def goto_trick_menu(goto_home, pick_menu_item, cap_menu): if 'New Seed Words' in menu: raise pytest.skip("need seed set first for these tests") - if "Ready To Sign" not in menu: - goto_home() - time.sleep(.1) - + goto_home() + time.sleep(.1) pick_menu_item('Settings') time.sleep(.1) menu = cap_menu() @@ -199,6 +197,7 @@ def goto_trick_menu(goto_home, pick_menu_item, cap_menu): def clear_all_tricks(goto_trick_menu, pick_menu_item, press_select, cap_story): def doit(): goto_trick_menu() + time.sleep(.1) pick_menu_item('Delete All') time.sleep(.1) press_select() @@ -858,6 +857,13 @@ def test_se2_trick_backups(goto_trick_menu, clear_all_tricks, repl, unit_test, vals2, tr2 = decode_backup(bk2) + # HW switches are set to default OFF after clone or backup + # changed here 7819f0b4d8d4e2c5efa666d0baf46817ad3000a7 + if 'setting.nfc' in vals and vals['setting.nfc']: + vals['setting.nfc'] = 0 # restoring from backup always set NFC to default OFF + if 'setting.vidsk' in vals and vals['setting.vidsk']: + vals['setting.vidsk'] = 0 # restoring from backup always set VDisk to default OFF + assert vals == vals2 assert trimmed == tr2 diff --git a/testing/test_ux.py b/testing/test_ux.py index cf7efd33..336045b8 100644 --- a/testing/test_ux.py +++ b/testing/test_ux.py @@ -884,13 +884,16 @@ def test_sign_file_from_list_files(f_len, goto_home, cap_story, pick_menu_item, _, story = cap_story() assert f"Signature file {signame} written" in story need_keypress("y") + time.sleep(0.1) verify_detached_signature_file([fname], signame, "sd", AF_CLASSIC) + time.sleep(0.1) _, story = cap_story() assert "(4) to sign file digest and export detached signature" not in story assert "(6) to delete" in story need_keypress("6") + time.sleep(0.1) menu = cap_menu() assert "List Files" in menu