+ {statusError ? (
+
+
+
+ {statusError}
+
+
+ ) : (
+ <>
+ {/* Wallet configured banner */}
+
+
+
+ {t('mnemonic.walletAlreadyConfigured')}
+
+
+
+ {/* Wallet metadata */}
+ {walletStatus && (
+
+ {walletStatus.source && (
+
+
+ {t('mnemonic.walletSource')}
+
+
+ {walletStatus.source}
+
+
+ )}
+ {walletStatus.mnemonicWordCount && (
+
+
+ {t('mnemonic.walletWordCount')}
+
+
+ {walletStatus.mnemonicWordCount} words
+
+
+ )}
+ {walletStatus.updatedAtMs && (
+
+
+ {t('mnemonic.walletLastUpdated')}
+
+
+ {new Date(walletStatus.updatedAtMs).toLocaleDateString()}
+
+
+ )}
+ {walletStatus.accounts.length > 0 && (
+
+
+ {t('mnemonic.viewAccounts')}
+
+
+ {walletStatus.accounts.map(account => (
+
+
+ {account.chain}
+
+
+ {account.address}
+
+
+ ))}
+
+
+ )}
+
+ )}
+
+ {/* Reveal existing recovery phrase */}
+ {viewMnemonic ? (
+
+
+
+
+ {t('mnemonic.cannotRecover')}
+
+
+
+
+ {viewMnemonic.split(' ').map((word, index) => (
+
+
+ {index + 1}.
+
+ {word}
+
+ ))}
+
+ {!viewRevealed && (
+
+ )}
+
+
+
+
+ ) : (
+ <>
+ {viewRevealError && (
+
+
+
+ {viewRevealError}
+
+
+ )}
+
+ >
+ )}
+
+ {/* Replace wallet CTA */}
+
+ >
+ )}
+
+ );
+
+ const renderReplaceConfirm = () => (
+
+ {/* Danger warning */}
+
+
+
+ {t('mnemonic.replaceWalletWarning')}
+
+
+
+ {/* Replace confirmation button */}
+
+
+ {/* Import instead */}
+
+
+ {/* Cancel */}
+
+
+ );
+
+ const renderGenerateMode = () => (
+ <>
+
+
+ {importWords.map((word, index) => (
+
+
+ {index + 1}.
+
+ {
+ inputRefs.current[index] = el;
+ }}
+ type="text"
+ value={word}
+ onChange={e => handleImportWordChange(index, e.target.value)}
+ onKeyDown={e => handleImportKeyDown(index, e)}
+ autoComplete="off"
+ spellCheck={false}
+ className={`w-full font-mono text-sm font-medium px-2 py-1.5 rounded-lg border bg-white dark:bg-neutral-900 text-neutral-800 dark:text-neutral-100 outline-none transition-colors ${
+ importValid === false && word.trim()
+ ? 'border-coral-400 focus:border-coral-300 dark:border-coral-500/40'
+ : importValid === true
+ ? 'border-sage-400 focus:border-sage-300 dark:border-sage-500/40'
+ : 'border-neutral-200 dark:border-neutral-800 focus:border-primary-400'
+ }`}
+ />
+
+ ))}
+
+
+
+ {importValid === true && (
+