Skip to content

fix: add mnemonic validation and fix view-only restore for Monero-family coins - #1367

Open
sneurlax wants to merge 3 commits into
stagingfrom
fix/1167-monero-restore-validation
Open

sneurlax wants to merge 3 commits into
stagingfrom
fix/1167-monero-restore-validation

Conversation

@sneurlax

Copy link
Copy Markdown
Member

closes #1167

@codecov

codecov Bot commented May 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.77707% with 142 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.96%. Comparing base (1e2e4d9) to head (b8ccbc1).
⚠️ Report is 26 commits behind head on staging.

Files with missing lines Patch % Lines
...views/restore_wallet_view/restore_wallet_view.dart 54.95% 141 Missing ⚠️
...wallets/wallet/intermediate/lib_monero_wallet.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1367      +/-   ##
===========================================
+ Coverage     7.85%    9.96%   +2.10%     
===========================================
  Files         1125     1129       +4     
  Lines       112820   113548     +728     
===========================================
+ Hits          8866    11316    +2450     
+ Misses      103954   102232    -1722     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sneurlax
sneurlax force-pushed the fix/1167-monero-restore-validation branch from 03bcbae to 4f856f1 Compare August 24, 2026 21:31
recoverViewOnly() called exit() only when there was nothing to exit,
so an about-to-be-orphaned native wallet was left auto saving, listening
and syncing on a handle nothing references any more. Use the same guard
the seed recover() path already has.
No field in the restore view has a validator, so the Form guard on
attemptRestore() always passed and only BIP39 coins were checked at all.
Gate the submit on the per field statuses instead, recomputed at submit
time so a value written straight into a controller (a paste, a QR scan)
is judged too.

A legacy CryptoNote word is accepted by the three character prefix rule
the English wordlist declares, or as a whole word from any other legacy
wordlist the wallet library ships, since the library detects a seed's
language itself. The phrase is hidden only once it has cleared every
check.

Dropping the Form wrappers reindents most of the file; read with -w.

closes #1167
@sneurlax
sneurlax force-pushed the fix/1167-monero-restore-validation branch from 4f856f1 to b8ccbc1 Compare October 13, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: can't restore monero from a recovery phrase

1 participant