The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix: cache leak, back button, max balance, etc....
iamrhn222fab8574c9
diff --git a/app/src/components/settings/panels/RecoveryPhraseGenerateMode.tsx b/app/src/components/settings/panels/RecoveryPhraseGenerateMode.tsxindex 1532a16793..07d0e16bdc 100644--- a/app/src/components/settings/panels/RecoveryPhraseGenerateMode.tsx+++ b/app/src/components/settings/panels/RecoveryPhraseGenerateMode.tsx@@ -54,7 +54,9 @@ const RecoveryPhraseGenerateMode = ({))}</div>{!revealed && (- <div+ <button+ type="button"+ aria-label="Reveal recovery phrase"className="absolute inset-0 z-10 flex flex-col items-center justify-center cursor-pointer bg-black/40 hover:bg-black/30 transition-colors"onClick={onReveal}><svg@@ -72,7 +74,7 @@ const RecoveryPhraseGenerateMode = ({<span className="text-[15px] font-semibold text-white tracking-tight">Tap to reveal</span>- </div>+ </button>)}</div>diff --git a/app/src/components/settings/panels/RecoveryPhrasePanel.tsx b/app/src/components/settings/panels/RecoveryPhrasePanel.tsxindex 46c7ee6d52..fc62d8ea3d 100644--- a/app/src/components/settings/panels/RecoveryPhrasePanel.tsx+++ b/app/src/components/settings/panels/RecoveryPhrasePanel.tsx@@ -334,22 +334,24 @@ const RecoveryPhrasePanel = () => {{(mode === 'generate' || mode === 'import') && (<>- <button- onClick={() => {- setMode('view');- setError(null);- }}- className="flex w-8 h-8 items-center justify-center rounded-full text-content-muted hover:bg-surface-hover hover:text-content transition-colors mb-4 -ml-2"- aria-label="Back">- <svg- className="w-5 h-5"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- strokeWidth={2.5}>- <path strokeLinecap="round" strokeLinejoin="round" d="M15 19l-7-7 7-7" />- </svg>- </button>+ {walletStatus?.configured && (+ <button+ onClick={() => {+ setMode('view');+ setError(null);+ }}+ className="flex w-8 h-8 items-center justify-center rounded-full text-content-muted hover:bg-surface-hover hover:text-content transition-colors mb-4 -ml-2"+ aria-label="Back">+ <svg+ className="w-5 h-5"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ strokeWidth={2.5}>+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 19l-7-7 7-7" />+ </svg>+ </button>+ )}{mode === 'generate' ? (<RecoveryPhraseGenerateModewords={words}@@ -391,11 +393,43 @@ const RecoveryPhrasePanel = () => {<span>{t('mnemonic.securingData')}</span></>) : mode === 'import' ? (- 'Import Wallet'+ t('mnemonic.importWallet')) : (t('mnemonic.saveRecoveryPhrase'))}</Button>++ {mode === 'generate' && (+ <p className="text-center mt-3 text-sm">+ <button+ type="button"+ onClick={() => {+ setError(null);+ setMode('import');+ }}+ className="text-primary-500 hover:text-primary-400 font-medium transition-colors">+ {t('mnemonic.importAnExistingWallet')}+ </button>+ </p>+ )}++ {mode === 'import' && (+ <p className="text-center mt-3 text-sm">+ <button+ type="button"+ onClick={() => {+ const phrase = generateMnemonicPhrase();+ setMnemonic(phrase);+ setConfirmed(false);+ setRevealed(false);+ setError(null);+ setMode('generate');+ }}+ className="text-primary-500 hover:text-primary-400 font-medium transition-colors">+ {t('mnemonic.createANewWallet')}+ </button>+ </p>+ )}</>)}</>diff --git a/app/src/components/settings/panels/WalletBalancesPanel.tsx b/app/src/components/settings/panels/WalletBalancesPanel.tsxindex b23d647f27..bf57947520 100644--- a/app/src/components/settings/panels/WalletBalancesPanel.tsx+++ b/app/src/components/settings/panels/WalletBalancesPanel.tsx@@ -23,6 +23,11 @@ import {balanceNetworkLabel,formatDisplayBalance,} from '../../../features/wallet/walletDisplay';+// ---------------------------------------------------------------------------+// WalletBalancesPanel — main panel+// ---------------------------------------------------------------------------++import { useUser } from '../../../hooks/useUser';import { cn } from '../../../lib/cn';import { useT } from '../../../lib/i18n/I18nContext';import {@@ -83,16 +88,7 @@ export const TOKEN_ICONS: Record<string, string> = {TRX: tokenTronIcon,};-// ----------------------------------------------------------------------------// Chain badge colours — each chain gets a distinct palette token combination-// that maps to the project's sage / amber / coral / ocean (primary) design-// language. Tailwind class strings are kept literal so the build can detect-// them via static analysis.-// -----------------------------------------------------------------------------// The rows rendered as placeholders before the wallet is set up, mirroring the-// configured layout (one EVM row per displayed network + BTC/Solana/Tron) so-// the preview matches what appears once a recovery phrase exists.+// Chain badge coloursconst PLACEHOLDER_ROWS: Array<{chain: WalletChain;evmNetwork?: EvmNetwork;@@ -380,23 +376,29 @@ const ChainPlaceholderRow = ({// WalletBalancesPanel — main panel// ----------------------------------------------------------------------------// Keep balances cached when switching tabs-let cachedBalances: BalanceInfo[] | null = null;-let cachedWalletConfigured: boolean | null = null;+// Keep balances cached when switching tabs (keyed by user ID to prevent cross-user leakage)+const cachedBalances: Record<string, BalanceInfo[] | null> = {};+const cachedWalletConfigured: Record<string, boolean | null> = {};const WalletBalancesPanel = () => {const { t } = useT();const { navigateToSettings } = useSettingsNavigation();+ const { user } = useUser();+ const userId = user?._id || 'anonymous';- const [balances, setBalances] = useState<BalanceInfo[] | null>(cachedBalances);- const [loading, setLoading] = useState(cachedBalances === null);+ const [balances, setBalances] = useState<BalanceInfo[] | null>(cachedBalances[userId] ?? null);+ const [loading, setLoading] = useState(+ cachedBalances[userId] === undefined || cachedBalances[userId] === null+ );const [isRefreshing, setIsRefreshing] = useState(false);const [error, setError] = useState<string | null>(null);const [isManageModalOpen, setIsManageModalOpen] = useState(false);const [isNetworkModalOpen, setIsNetworkModalOpen] = useState(false);// null = unknown (not yet loaded); false = wallet has no recovery phrase set// up yet, in which case we show a hint + placeholder rows instead of erroring.- const [walletConfigured, setWalletConfigured] = useState<boolean | null>(cachedWalletConfigured);+ const [walletConfigured, setWalletConfigured] = useState<boolean | null>(+ cachedWalletConfigured[userId] ?? null+ );// The balance row a Send / Receive modal is currently open for (null = none).const [sendTarget, setSendTarget] = useState<BalanceInfo | null>(null);const [receiveTarget, setReceiveTarget] = useState<BalanceInfo | null>(null);@@ -415,7 +417,7 @@ const WalletBalancesPanel = () => {const loadBalances = useCallback(async () => {const requestId = ++latestRequestIdRef.current;- if (!cachedBalances) {+ if (!cachedBalances[userId]) {setLoading(true);} else {setIsRefreshing(true);@@ -429,17 +431,17 @@ const WalletBalancesPanel = () => {const status = await fetchWalletStatus();if (requestId !== latestRequestIdRef.current) return;if (!status.configured) {- cachedWalletConfigured = false;- cachedBalances = [];+ cachedWalletConfigured[userId] = false;+ cachedBalances[userId] = [];setWalletConfigured(false);setBalances([]);return;}- cachedWalletConfigured = true;+ cachedWalletConfigured[userId] = true;setWalletConfigured(true);const rows = await fetchWalletBalances();if (requestId !== latestRequestIdRef.current) return;- cachedBalances = rows;+ cachedBalances[userId] = rows;setBalances(rows);} catch (err) {if (requestId !== latestRequestIdRef.current) return;@@ -538,9 +540,9 @@ const WalletBalancesPanel = () => {<div className="px-4 pt-4 pb-3"><divrole="status"- className="flex items-start gap-2.5 p-3 rounded-xl bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/30">+ className="flex items-start gap-2.5 p-3 rounded-xl bg-destructive/10 border-0"><svg- className="w-4 h-4 text-amber-500 shrink-0 mt-0.5"+ className="w-4 h-4 text-destructive shrink-0 mt-0.5"fill="none"viewBox="0 0 24 24"stroke="currentColor"@@ -552,14 +554,14 @@ const WalletBalancesPanel = () => {/></svg><div className="flex-1 min-w-0">- <p className="text-xs text-amber-700 dark:text-amber-300 leading-relaxed">+ <p className="text-sm text-destructive leading-relaxed">{t('walletBalances.setupHint')}</p><Buttontype="button"variant="tertiary"onClick={() => navigateToSettings('recovery-phrase')}- className="mt-2 text-xs font-medium text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300">+ className="mt-2 text-sm font-medium text-primary-800 dark:text-primary-400 hover:text-primary-900 dark:hover:text-primary-300 px-0 h-auto">{t('walletBalances.setupCta')}</Button></div>diff --git a/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.test.tsx b/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.test.tsxindex ffbbb20a9e..a5d81a86c3 100644--- a/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.test.tsx+++ b/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.test.tsx@@ -114,8 +114,8 @@ describe('RecoveryPhrasePanel — trust-surface polish', () => {it('renders import-mode intro copy when switching modes', async () => {renderWithProviders(<RecoveryPhrasePanel />);- await waitFor(() => screen.getByText(/I want to import an existing wallet/i));- fireEvent.click(screen.getByText(/I want to import an existing wallet/i));+ await waitFor(() => screen.getByText(/Import an Existing Wallet/i));+ fireEvent.click(screen.getByText(/Import an Existing Wallet/i));expect(screen.getByText(/Enter your recovery phrase below/i)).toBeTruthy();});@@ -144,7 +144,7 @@ describe('RecoveryPhrasePanel — mode-switch state reset', () => {await waitFor(() => screen.getByText(/can never be recovered if lost/i));expect(screen.getByText(/can never be recovered if lost/i)).toBeTruthy();- fireEvent.click(screen.getByText(/I want to import an existing wallet/i));+ fireEvent.click(screen.getByText(/Import an Existing Wallet/i));expect(screen.getByText(/Enter your recovery phrase below/i)).toBeTruthy();});@@ -156,21 +156,21 @@ describe('RecoveryPhrasePanel — mode-switch state reset', () => {fireEvent.click(checkbox);expect(checkbox).toBeChecked();- fireEvent.click(screen.getByText(/I want to import an existing wallet/i));+ fireEvent.click(screen.getByText(/Import an Existing Wallet/i));expect(screen.queryByRole('checkbox')).toBeNull();- fireEvent.click(screen.getByText(/I want to generate a new wallet/i));+ fireEvent.click(screen.getByText(/Create a New Wallet/i));const regeneratedCheckbox = screen.getByRole('checkbox');expect(regeneratedCheckbox).not.toBeChecked();});it('shows generate-mode UI again after switching back from import', async () => {renderWithProviders(<RecoveryPhrasePanel />);- await waitFor(() => screen.getByText(/I want to import an existing wallet/i));- fireEvent.click(screen.getByText(/I want to import an existing wallet/i));+ await waitFor(() => screen.getByText(/Import an Existing Wallet/i));+ fireEvent.click(screen.getByText(/Import an Existing Wallet/i));expect(screen.getByText(/Enter your recovery phrase below/i)).toBeTruthy();- fireEvent.click(screen.getByText(/I want to generate a new wallet/i));+ fireEvent.click(screen.getByText(/Create a New Wallet/i));expect(screen.getByText(/can never be recovered if lost/i)).toBeTruthy();});});@@ -563,9 +563,9 @@ describe('RecoveryPhrasePanel — import mode word inputs and valid/invalid styl// Covers lines 633-634 (onChange on word inputs updates importWords).it('typing into a word input updates the value (onChange coverage)', async () => {renderWithProviders(<RecoveryPhrasePanel />);- await waitFor(() => screen.getByText(/I want to import an existing wallet/i));+ await waitFor(() => screen.getByText(/Import an Existing Wallet/i));- fireEvent.click(screen.getByText(/I want to import an existing wallet/i));+ fireEvent.click(screen.getByText(/Import an Existing Wallet/i));await waitFor(() => screen.getByText(/Enter your recovery phrase below/i));const wordInputs = screen.getAllByLabelText(/Recovery phrase word/i);@@ -576,9 +576,9 @@ describe('RecoveryPhrasePanel — import mode word inputs and valid/invalid styl// Covers line 638 (onKeyDown on word inputs — Backspace on empty field).it('pressing Backspace on an empty word input (onKeyDown coverage)', async () => {renderWithProviders(<RecoveryPhrasePanel />);- await waitFor(() => screen.getByText(/I want to import an existing wallet/i));+ await waitFor(() => screen.getByText(/Import an Existing Wallet/i));- fireEvent.click(screen.getByText(/I want to import an existing wallet/i));+ fireEvent.click(screen.getByText(/Import an Existing Wallet/i));await waitFor(() => screen.getByText(/Enter your recovery phrase below/i));const wordInputs = screen.getAllByLabelText(/Recovery phrase word/i);@@ -591,9 +591,9 @@ describe('RecoveryPhrasePanel — import mode word inputs and valid/invalid styl// Covers lines 640 (importValid===false invalid border), 638, and 707 (error alert).it('clicking Save with an invalid phrase shows the error alert (line 707)', async () => {renderWithProviders(<RecoveryPhrasePanel />);- await waitFor(() => screen.getByText(/I want to import an existing wallet/i));+ await waitFor(() => screen.getByText(/Import an Existing Wallet/i));- fireEvent.click(screen.getByText(/I want to import an existing wallet/i));+ fireEvent.click(screen.getByText(/Import an Existing Wallet/i));await waitFor(() => screen.getByText(/Enter your recovery phrase below/i));// Fill all 12 slots with an invalid word so the phrase is structurally complete but invalid.@@ -615,9 +615,9 @@ describe('RecoveryPhrasePanel — import mode word inputs and valid/invalid styl// Covers line 650 (importValid===true banner), line 640 (sage border on valid inputs).it('filling a valid BIP39 phrase and saving shows the valid-phrase banner then persists', async () => {renderWithProviders(<RecoveryPhrasePanel />);- await waitFor(() => screen.getByText(/I want to import an existing wallet/i));+ await waitFor(() => screen.getByText(/Import an Existing Wallet/i));- fireEvent.click(screen.getByText(/I want to import an existing wallet/i));+ fireEvent.click(screen.getByText(/Import an Existing Wallet/i));await waitFor(() => screen.getByText(/Enter your recovery phrase below/i));const wordInputs = screen.getAllByLabelText(/Recovery phrase word/i);@@ -643,9 +643,9 @@ describe('RecoveryPhrasePanel — import mode word inputs and valid/invalid styl// Covers line 608 (handleWordCountChange via the word-count toggle buttons).it('switching from 12 to 15 word slots adjusts the import grid', async () => {renderWithProviders(<RecoveryPhrasePanel />);- await waitFor(() => screen.getByText(/I want to import an existing wallet/i));+ await waitFor(() => screen.getByText(/Import an Existing Wallet/i));- fireEvent.click(screen.getByText(/I want to import an existing wallet/i));+ fireEvent.click(screen.getByText(/Import an Existing Wallet/i));await waitFor(() => screen.getByText(/Enter your recovery phrase below/i));// Initially 12 slots.diff --git a/app/src/components/settings/panels/wallet/ReceiveModal.tsx b/app/src/components/settings/panels/wallet/ReceiveModal.tsxindex f324d13c56..cbf990efd3 100644--- a/app/src/components/settings/panels/wallet/ReceiveModal.tsx+++ b/app/src/components/settings/panels/wallet/ReceiveModal.tsx@@ -22,7 +22,7 @@ interface ReceiveModalProps {const ReceiveModal = ({ balance, onClose }: ReceiveModalProps) => {const { t } = useT();const baseLabel = balanceNetworkLabel(balance);- const networkLabel = balance.chain === 'tron' ? 'TRX' : baseLabel;+ const networkLabel = baseLabel;const [copied, setCopied] = useState(false);const copyTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);diff --git a/app/src/components/settings/panels/wallet/RevealRecoveryModal.tsx b/app/src/components/settings/panels/wallet/RevealRecoveryModal.tsxindex ddd35c20f8..31699ca49c 100644--- a/app/src/components/settings/panels/wallet/RevealRecoveryModal.tsx+++ b/app/src/components/settings/panels/wallet/RevealRecoveryModal.tsx@@ -101,7 +101,9 @@ export default function RevealRecoveryModal({ open, onClose, mnemonic }: RevealR</div>{!revealed && (- <div+ <button+ type="button"+ aria-label="Reveal recovery phrase"className="absolute inset-0 z-10 flex flex-col items-center justify-center cursor-pointer bg-black/40 hover:bg-black/30 transition-colors"onClick={() => setRevealed(true)}><svg@@ -122,7 +124,7 @@ export default function RevealRecoveryModal({ open, onClose, mnemonic }: RevealR<span className="text-[12px] font-medium text-white/80">Make sure no one is watching your screen.</span>- </div>+ </button>)}</div>) : null}diff --git a/app/src/components/settings/panels/wallet/SendCryptoModal.tsx b/app/src/components/settings/panels/wallet/SendCryptoModal.tsxindex 90dc37947e..3fa58bae6f 100644--- a/app/src/components/settings/panels/wallet/SendCryptoModal.tsx+++ b/app/src/components/settings/panels/wallet/SendCryptoModal.tsx@@ -200,7 +200,7 @@ const SendCryptoModal = ({ balance, onClose, onSuccess }: SendCryptoModalProps)</span><buttontype="button"- onClick={() => setAmount(formatDisplayBalance(balance.formatted))}+ onClick={() => setAmount(balance.formatted)}className="text-primary-500 font-medium hover:text-primary-600 transition-colors">Max</button>diff --git a/app/src/lib/i18n/ar.ts b/app/src/lib/i18n/ar.tsindex 0cd354cc34..cede807373 100644--- a/app/src/lib/i18n/ar.ts+++ b/app/src/lib/i18n/ar.ts@@ -6478,6 +6478,9 @@ const messages: TranslationMap = {'invites.redeemHeading': 'هل لديك رمز إحالة؟','invites.redeemPlaceholder': 'رمز الإحالة','invites.redeemSubmit': 'استخدام الرمز',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet',};export default messages;diff --git a/app/src/lib/i18n/bn.ts b/app/src/lib/i18n/bn.tsindex 1563229586..2fa47c2abf 100644--- a/app/src/lib/i18n/bn.ts+++ b/app/src/lib/i18n/bn.ts@@ -1945,6 +1945,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'এটি আপনার বর্তমান ওয়ালেটকে স্থায়ীভাবে প্রতিস্থাপন করবে। এগিয়ে যাওয়ার আগে নিশ্চিত করুন যে আপনি আপনার রিকভারি ফ্রেজ ব্যাকআপ করেছেন।','mnemonic.replaceWalletConfirm': 'আমি বুঝতে পারছি, আমার ওয়ালেট প্রতিস্থাপন করুন',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'ওয়ালেটের স্থিতি পরীক্ষা করা হচ্ছে...','mnemonic.viewAccounts': 'ওয়ালেট অ্যাকাউন্ট','mnemonic.revealRecoveryPhrase': 'পুনরুদ্ধার বাক্যাংশ প্রকাশ করুন',diff --git a/app/src/lib/i18n/de.ts b/app/src/lib/i18n/de.tsindex 51542d3783..694fabbe49 100644--- a/app/src/lib/i18n/de.ts+++ b/app/src/lib/i18n/de.ts@@ -2007,6 +2007,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'Dies wird deine aktuelle Wallet dauerhaft ersetzen. Stelle sicher, dass du deine Recovery-Phrase gesichert hast, bevor du fortfährst.','mnemonic.replaceWalletConfirm': 'Ich verstehe, meine Wallet ersetzen',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'Wallet-Status wird geprüft...','mnemonic.viewAccounts': 'Wallet-Konten','mnemonic.revealRecoveryPhrase': 'Wiederherstellungsphrase anzeigen',diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.tsindex 8fee985c52..a52c42cefa 100644--- a/app/src/lib/i18n/en.ts+++ b/app/src/lib/i18n/en.ts@@ -2171,6 +2171,9 @@ const en: TranslationMap = {'mnemonic.viewAccounts': 'Wallet accounts','mnemonic.revealRecoveryPhrase': 'Reveal recovery phrase','mnemonic.hidePhrase': 'Hide phrase',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet',// Team'team.failedToCreate': 'Failed to create team',diff --git a/app/src/lib/i18n/es.ts b/app/src/lib/i18n/es.tsindex 206afb9f9a..d362fe70f1 100644--- a/app/src/lib/i18n/es.ts+++ b/app/src/lib/i18n/es.ts@@ -1984,6 +1984,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'Esto reemplazará permanentemente tu billetera actual. Asegúrate de haber guardado tu frase de recuperación antes de continuar.','mnemonic.replaceWalletConfirm': 'Entiendo, reemplazar mi billetera',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'Verificando estado de la billetera...','mnemonic.viewAccounts': 'Cuentas de la billetera','mnemonic.revealRecoveryPhrase': 'Revelar frase de recuperación',diff --git a/app/src/lib/i18n/fr.ts b/app/src/lib/i18n/fr.tsindex e2e929965d..6836472886 100644--- a/app/src/lib/i18n/fr.ts+++ b/app/src/lib/i18n/fr.ts@@ -2003,6 +2003,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':"Cela remplacera définitivement ton portefeuille actuel. Assure-toi d'avoir sauvegardé ta phrase de récupération avant de continuer.",'mnemonic.replaceWalletConfirm': 'Je comprends, remplacer mon portefeuille',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'Vérification du statut du portefeuille...','mnemonic.viewAccounts': 'Voir les comptes du portefeuille','mnemonic.revealRecoveryPhrase': 'Révéler la phrase de récupération',diff --git a/app/src/lib/i18n/hi.ts b/app/src/lib/i18n/hi.tsindex e5e9881192..8f5ec2cc67 100644--- a/app/src/lib/i18n/hi.ts+++ b/app/src/lib/i18n/hi.ts@@ -1944,6 +1944,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'यह आपके मौजूदा वॉलेट को स्थायी रूप से बदल देगा। आगे बढ़ने से पहले सुनिश्चित करें कि आपने अपनी रिकवरी फ्रेज़ का बैकअप ले लिया है।','mnemonic.replaceWalletConfirm': 'मैं समझता/समझती हूँ, मेरा वॉलेट बदलें',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'वॉलेट की स्थिति जाँची जा रही है...','mnemonic.viewAccounts': 'वॉलेट खाते','mnemonic.revealRecoveryPhrase': 'रिकवरी वाक्यांश प्रकट करें',diff --git a/app/src/lib/i18n/id.ts b/app/src/lib/i18n/id.tsindex a12e1844d2..e60248e693 100644--- a/app/src/lib/i18n/id.ts+++ b/app/src/lib/i18n/id.ts@@ -1957,6 +1957,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'Ini akan mengganti dompetmu saat ini secara permanen. Pastikan kamu telah mencadangkan frasa pemulihan sebelum melanjutkan.','mnemonic.replaceWalletConfirm': 'Saya mengerti, ganti dompet saya',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'Memeriksa status dompet...','mnemonic.viewAccounts': 'Akun dompet','mnemonic.revealRecoveryPhrase': 'Tampilkan frasa pemulihan',diff --git a/app/src/lib/i18n/it.ts b/app/src/lib/i18n/it.tsindex b37fd7065f..cb5f453219 100644--- a/app/src/lib/i18n/it.ts+++ b/app/src/lib/i18n/it.ts@@ -1985,6 +1985,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'Questo sostituirà definitivamente il tuo portafoglio attuale. Assicurati di aver salvato la tua frase di recupero prima di procedere.','mnemonic.replaceWalletConfirm': 'Capisco, sostituisci il mio portafoglio',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'Verifica dello stato del portafoglio...','mnemonic.viewAccounts': 'Conti del portafoglio','mnemonic.revealRecoveryPhrase': 'Rivela la frase di recupero',diff --git a/app/src/lib/i18n/ko.ts b/app/src/lib/i18n/ko.tsindex 4c5df19c9c..431da52369 100644--- a/app/src/lib/i18n/ko.ts+++ b/app/src/lib/i18n/ko.ts@@ -1922,6 +1922,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'현재 지갑이 영구적으로 교체됩니다. 진행하기 전에 복구 구문을 백업했는지 확인하세요.','mnemonic.replaceWalletConfirm': '이해합니다. 지갑을 교체합니다',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': '지갑 상태 확인 중...','mnemonic.viewAccounts': '지갑 계정','mnemonic.revealRecoveryPhrase': '복구 구문 표시',diff --git a/app/src/lib/i18n/pl.ts b/app/src/lib/i18n/pl.tsindex b51f2b5fe3..2f03379f9b 100644--- a/app/src/lib/i18n/pl.ts+++ b/app/src/lib/i18n/pl.ts@@ -1973,6 +1973,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'Spowoduje to trwałe zastąpienie Twojego obecnego portfela. Upewnij się, że masz kopię zapasową frazy odzyskiwania przed kontynuowaniem.','mnemonic.replaceWalletConfirm': 'Rozumiem, zastąp mój portfel',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'Sprawdzanie statusu portfela...','mnemonic.viewAccounts': 'Konta portfela','mnemonic.revealRecoveryPhrase': 'Ujawnij frazę odzyskiwania',diff --git a/app/src/lib/i18n/pt.ts b/app/src/lib/i18n/pt.tsindex 20b63451c3..e8d4f3d053 100644--- a/app/src/lib/i18n/pt.ts+++ b/app/src/lib/i18n/pt.ts@@ -1984,6 +1984,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'Isso substituirá permanentemente sua carteira atual. Certifique-se de ter feito backup da sua frase de recuperação antes de prosseguir.','mnemonic.replaceWalletConfirm': 'Entendo, substituir minha carteira',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'Verificando status da carteira...','mnemonic.viewAccounts': 'Contas da carteira','mnemonic.revealRecoveryPhrase': 'Revelar frase de recuperação',diff --git a/app/src/lib/i18n/ru.ts b/app/src/lib/i18n/ru.tsindex 4eef58aac2..b80af9873a 100644--- a/app/src/lib/i18n/ru.ts+++ b/app/src/lib/i18n/ru.ts@@ -1962,6 +1962,9 @@ const messages: TranslationMap = {'mnemonic.replaceWalletWarning':'Это навсегда заменит ваш текущий кошелёк. Убедитесь, что вы сделали резервную копию фразы восстановления, прежде чем продолжить.','mnemonic.replaceWalletConfirm': 'Я понимаю, заменить мой кошелёк',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': 'Проверка статуса кошелька...','mnemonic.viewAccounts': 'Счета кошелька','mnemonic.revealRecoveryPhrase': 'Показать фразу восстановления',diff --git a/app/src/lib/i18n/zh-CN.ts b/app/src/lib/i18n/zh-CN.tsindex abe62d9f42..c8b436ce75 100644--- a/app/src/lib/i18n/zh-CN.ts+++ b/app/src/lib/i18n/zh-CN.ts@@ -1816,6 +1816,9 @@ const messages: TranslationMap = {'mnemonic.replaceWallet': '替换钱包','mnemonic.replaceWalletWarning': '这将永久替换您当前的钱包。在继续之前,请确保您已备份恢复短语。','mnemonic.replaceWalletConfirm': '我明白,替换我的钱包',+ 'mnemonic.importAnExistingWallet': 'Import an Existing Wallet',+ 'mnemonic.createANewWallet': 'Create a New Wallet',+ 'mnemonic.importWallet': 'Import Wallet','mnemonic.loadingWalletStatus': '正在检查钱包状态...','mnemonic.viewAccounts': '钱包账户','mnemonic.revealRecoveryPhrase': '显示恢复短语',diff --git a/crates/openhuman-core/src/security/credentials/profiles.rs b/crates/openhuman-core/src/security/credentials/profiles.rsindex a13ac0b8cd..e93c5df8b6 100644--- a/crates/openhuman-core/src/security/credentials/profiles.rs+++ b/crates/openhuman-core/src/security/credentials/profiles.rs@@ -4,8 +4,7 @@ use anyhow::{Context, Result};use chrono::{DateTime, Utc};use serde::{Deserialize, Serialize};use std::collections::{BTreeMap, HashMap};-use std::fs::{self, OpenOptions};-use std::io::Write;+use std::fs;use std::path::{Path, PathBuf};use std::sync::{Mutex, MutexGuard, OnceLock};use std::thread;