Catch a recovery phrase numbered "(1) … (2) …"

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju committed 2026-11-18 19:45:38 -08:00
1 parent 94dcadf54f
commit 49ad1b7b73
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -221,7 +221,7 @@ function privacyReason(text) {
const recent = [];
for (const token of line.toLowerCase().split(/[\s,;]+/)) {
const word = token
.replace(/^\d+[.)]?/, '')
.replace(/^\(?\d+[.)]?/, '')
.replace(/(?<=[a-z])[^a-z]+$/, '');
if (!word && token) continue;
if (!isBip39Word(word)) {
+1
View File
@@ -471,6 +471,7 @@ test('spelled-out emails, addresses, phrases, codes and short phone numbers stay
'verification code ABCDEF thanks a lot',
'otp ABCDEF cheers',
'otp ab12cd - thanks',
'(1) abandon (2) ability (3) able (4) about (5) above (6) absent (7) absorb (8) abstract (9) absurd (10) abuse (11) access (12) accident',
'gate code aBcD - thanks',
'abandon ability able about above absent absorb abstract absurd abuse access accident.',
'abandon, ability, able, about, above, absent, absorb, abstract, absurd, abuse, access, accident',