From ae9fabb001fbf80750d5cc211c4d816fabb8f506 Mon Sep 17 00:00:00 2001 From: "Peter D. Gray" Date: Tue, 8 Aug 2023 08:50:47 -0400 Subject: [PATCH] align xor 24-seed words display w/ page breaks --- shared/ux_mk4.py | 2 +- shared/ux_q1.py | 4 ++-- shared/xor_seed.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shared/ux_mk4.py b/shared/ux_mk4.py index 137124bc..aaa1d48f 100644 --- a/shared/ux_mk4.py +++ b/shared/ux_mk4.py @@ -494,7 +494,7 @@ def ux_dice_rolling(): # return funct to draw updating part return update -def ux_render_words(words): +def ux_render_words(words, **kws): # caution: text layout here, and flag sensitive=T trigger side-channel defenses return '\n'.join('%2d: %s' % (i+1, w) for i,w in enumerate(words)) diff --git a/shared/ux_q1.py b/shared/ux_q1.py index 8701c7f7..450e38ff 100644 --- a/shared/ux_q1.py +++ b/shared/ux_q1.py @@ -372,12 +372,12 @@ async def ux_login_countdown(sec): dis.busy_bar(0) -def ux_render_words(words): +def ux_render_words(words, leading_blanks=1): # re-use word-list rendering code to show as a string in a story. # - because I want them all on-screen at once, and not simple to do that buf = [bytearray(CHARS_W) for y in range(CHARS_H)] - rv = [''] + rv = [''] * leading_blanks num_words = len(words) if num_words == 12: diff --git a/shared/xor_seed.py b/shared/xor_seed.py index 384332f7..79cfb3f3 100644 --- a/shared/xor_seed.py +++ b/shared/xor_seed.py @@ -206,11 +206,11 @@ class XORWordNestMenu(WordNestMenu): async def show_n_parts(parts, chk_word): num_parts = len(parts) seed_len = len(parts[0]) - msg = 'Record these %d lists of %d-words each.\n\n' % (num_parts, seed_len) + msg = 'Record these %d lists of %d-words each: ' % (num_parts, seed_len) for n,words in enumerate(parts): msg += 'Part %s:\n' % chr(65+n) - msg += ux_render_words(words) + msg += ux_render_words(words, leading_blanks=0) msg += '\n\n' msg += ('The correctly reconstructed seed phrase will have this final word,'