fix(app): the phrase typed back is kept out of screenshots too

The reading of the full reading's fixes found that the recovery phrase
typed back (recovering, resetting an authenticator, finishing a reset
that keeps the keys) showed all 24 words in a plain field, in Android's
recent apps, screenshots and iOS's app switcher, while people switch
apps to read it; and the three words typed back at sign-up alike.
PhraseField and PhraseCheckFields now show inside a SecretScreen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-21 16:17:26 +02:00
commit fac9a000a1
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -46,11 +46,22 @@ void main() {
expect(find.byKey(SecretScreen.coverKey), findsNothing);
});
testWidgets('the phrase, the recovery codes and an authenticator are each '
'shown as a secret', (tester) async {
testWidgets('the phrase, shown or typed back, the recovery codes and an '
'authenticator are each shown as a secret (typed back: the reading of '
'the fixes)', (tester) async {
final code = TextEditingController();
addTearDown(code.dispose);
final typed = TextEditingController();
addTearDown(typed.dispose);
final words = [TextEditingController(), TextEditingController()];
addTearDown(() {
for (final word in words) {
word.dispose();
}
});
for (final view in [
PhraseField(controller: typed),
PhraseCheckFields(positions: const [2, 7], controllers: words),
const RecoveryPhraseView(
phrase:
'abandon abandon abandon abandon abandon abandon abandon abandon '