align xor 24-seed words display w/ page breaks
This commit is contained in:
parent
02b004b3cd
commit
ae9fabb001
@ -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))
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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,'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user