fix custom mwc mnemonic length null error
What changed, and why it matters
This commit fixes a bug where creating a new Mimblewimblecoin (MWC) wallet could leave the recovery-phrase passphrase unset (null) instead of setting it to an empty string. The change adds Mimblewimblecoin to the same special-case handling already used for Epiccash and Solana wallets. A null passphrase could cause a crash or unexpected wallet-creation failure, but there is no direct evidence it enables theft of funds or unauthorized access.
Treat as a routine bug fix. Verify that Mimblewimblecoin wallet creation no longer crashes or leaves the passphrase null, and review whether any other coin types share the same requirement for an empty-string passphrase default.
Security signals we found
Null-dereference / null-safety bug in wallet creation flow
Inconsistent special-case handling across coin types
Crash/failure during recovery-phrase setup
Evidence from the diff
In new_wallet_recovery_phrase_warning_view.dart, the code branches on coin type when deciding whether to assign an empty string to mnemonicPassphrase. Previously it only did this for Epiccash and Solana, so Mimblewimblecoin fell through and could leave mnemonicPassphrase null. The patch adds coin is Mimblewimblecoin to the conditional, aligning MWC with the other coins that require an empty-string default. This is a null-safety fix in wallet-creation UI flow.
Changed components
lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dartMimblewimblecoin (MWC) wallet creation flowRecovery phrase passphrase handlingInspect captured patch +3 / −1
diff --git a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart
index 031a8b4..52a78a9 100644
--- a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart
+++ b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart
@@ -199,7 +199,9 @@ class _NewWalletRecoveryPhraseWarningViewState
.mnemonicPassphrase;
} else {
// this may not be epiccash and sol specific?
- if (coin is Epiccash || coin is Solana) {
+ if (coin is Epiccash ||
+ coin is Mimblewimblecoin ||
+ coin is Solana) {
mnemonicPassphrase = "";
}
}
Why this scored 23/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.