use NFC symbol

This commit is contained in:
scgbckbone 2024-02-08 15:36:01 +01:00 committed by doc-hex
parent f5f7162c4d
commit 5b4c81c21b
4 changed files with 6 additions and 6 deletions

View File

@ -1043,7 +1043,7 @@ async def export_xpub(label, _2, item):
if '{acct}' in path:
msg += "Press (1) to select account other than zero. "
if glob.NFC:
msg += "Press (" + ("nfc" if version.has_qwerty else "3") + ") to share via NFC. "
msg += "Press %s to share via NFC. " % (KEY_NFC if version.has_qwerty else "(3)")
ch = await ux_show_story(msg, escape='13')
if ch == 'x': return
@ -1816,7 +1816,7 @@ or upload a transaction to be signed \
from your desktop wallet software or command line tools.\n\n'''
if NFC:
msg += 'Press (%s) to send PSBT using NFC.\n\n' % ("nfc" if version.has_qwerty else "3")
msg += 'Press %s to send PSBT using NFC.\n\n' % (KEY_NFC if version.has_qwerty else "(3)")
msg += "You will always be prompted to confirm the details before \
any signature is performed."

View File

@ -811,7 +811,7 @@ class ApproveTransaction(UserAuthorizedAction):
tmsg = txid + '\n\nPress (1) for QR Code of TXID. '
if NFC:
tmsg += 'Press (%s) to share signed txn via NFC.' % ("nfc" if version.has_qwerty else "3")
tmsg += 'Press %s to share signed txn via NFC.' % (KEY_NFC if version.has_qwerty else "(3)")
ch = await ux_show_story(tmsg, "Final TXID", escape='13')
@ -1292,7 +1292,7 @@ class ShowAddressBase(UserAuthorizedAction):
if not version.has_qwerty:
if NFC:
msg += ' Press (%s) to share via NFC.' % ("nfc" if version.has_qwerty else "3")
msg += ' Press %s to share via NFC.' % (KEY_NFC if version.has_qwerty else "(3)")
msg += ' Press (4) to view QR Code.'
while 1:

View File

@ -528,7 +528,7 @@ def test_export_xpub(use_nfc, acct_num, dev, cap_menu, pick_menu_item, goto_home
need_keypress(confirm)
got_pub = cap_screen_qr().decode('ascii')
else:
assert f'Press ({"nfc" if is_q1 else "3"})' in story
assert f'Press {KEY_NFC if is_q1 else "(3)"}' in story
assert 'NFC' in story
need_keypress(k_nfc)
time.sleep(0.2)

View File

@ -343,7 +343,7 @@ def test_nfc_after(num_outs, fake_txn, try_sign, nfc_read, need_keypress,
title, story = cap_story()
assert 'TXID' in title, story
txid = a2b_hex(story.split()[0])
assert f'Press ({"nfc" if is_q1 else "3"})' in story
assert f'Press {KEY_NFC if is_q1 else "(3)"}' in story
need_keypress(k_nfc)
if too_big: