From 99eb4b0345f3ae678f589fc17603399d74fca0bd Mon Sep 17 00:00:00 2001 From: scgbckbone Date: Mon, 10 Jul 2023 14:44:56 +0200 Subject: [PATCH] bug: xfp shown as integer in signing UI when bip39 passphrase in effect --- releases/ChangeLog.md | 1 + shared/actions.py | 2 +- testing/test_ux.py | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/releases/ChangeLog.md b/releases/ChangeLog.md index fa031415..04502843 100644 --- a/releases/ChangeLog.md +++ b/releases/ChangeLog.md @@ -11,6 +11,7 @@ - Bugfix: remove label from Bitcoin Core `importdescriptors` export as it is no longer supported with ranged descriptors in version `24.1` of Core. - Bugfix: empty number during BIP-39 passphrase entry could cause crash. +- Bugfix: UX: Signing with BIP39 Passphrase showed master fingerprint as integer. Fixed to show hex. ## 5.1.2 - 2023-04-07 diff --git a/shared/actions.py b/shared/actions.py index 14662113..8d6f2c9e 100644 --- a/shared/actions.py +++ b/shared/actions.py @@ -1750,7 +1750,7 @@ async def ready2sign(*a): max_size=MAX_TXN_LEN, taster=is_psbt) if stash.bip39_passphrase: - title = '[%s]' % settings.get('xfp') + title = '[%s]' % xfp2str(settings.get('xfp')) else: title = None diff --git a/testing/test_ux.py b/testing/test_ux.py index b7769986..a14d06b8 100644 --- a/testing/test_ux.py +++ b/testing/test_ux.py @@ -964,6 +964,24 @@ def test_sign_file_from_list_files(f_len, goto_home, cap_story, pick_menu_item, assert "List Files" in menu +def test_bip39_pw_signing_xfp_ux(goto_home, pick_menu_item, need_keypress, cap_story, + enter_complex, reset_seed_words): + goto_home() + pick_menu_item("Passphrase") + need_keypress("y") + enter_complex("21coinkite21") + pick_menu_item("APPLY") + time.sleep(0.3) + title, _ = cap_story() + assert title == "[0C9DC99D]" + need_keypress("y") # confirm new wallet + pick_menu_item("Ready To Sign") + time.sleep(0.1) + title_sign, _ = cap_story() + assert title == title_sign + reset_seed_words() # for subsequent tests + + @pytest.mark.onetime def test_dump_menutree(sim_execfile): # saves to ../unix/work/menudump.txt