CmdTestAutosignBase: simplify mnemonic entry

This commit is contained in:
The MMGen Project 2026-02-01 09:11:02 +00:00
commit 031ae051f9
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 7 additions and 2 deletions

View file

@ -47,7 +47,7 @@ from ..include.common import (
from .include.common import ref_dir, dfl_words_file, dfl_bip39_file
from .base import CmdTestBase
from .include.input import stealth_mnemonic_entry
from .include.input import mnemonic_entry
class CmdTestAutosignBase(CmdTestBase):
networks = ('btc',)
@ -238,7 +238,7 @@ class CmdTestAutosignBase(CmdTestBase):
'Type a number.*: ',
str(mne.entry_modes.index(entry_mode) + 1),
regex = True)
stealth_mnemonic_entry(t, mne, mn, entry_mode)
mnemonic_entry(t, mne, mn)
t.written_to_file('Autosign wallet')

View file

@ -14,6 +14,11 @@ import time
from ...include.common import getrand
from .common import randbool
def mnemonic_entry(t, mne, mn):
p_ok, _ = mne.word_prompt
for wnum, word in enumerate(mn, 1):
t.expect(p_ok.format(wnum), word + ' ')
def stealth_mnemonic_entry(t, mne, mn, entry_mode, pad_entry=False):
def pad_mnemonic(mn, ss_len):