update text (#1600)

This commit is contained in:
Justin Hernandez
2026-01-13 13:51:01 -08:00
committed by GitHub
parent bcbb8affd4
commit 2c0a03ac4b
3 changed files with 15 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ import Mnemonic from '@/components/Mnemonic';
import useMnemonic from '@/hooks/useMnemonic';
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
import { useSettingStore } from '@/stores/settingStore';
import { getRecoveryPhraseWarningMessage } from '@/utils/crypto/mnemonic';
import { IS_EUCLID_ENABLED } from '@/utils/devUtils';
function useCopyRecoveryPhrase(mnemonic: string[] | undefined) {
@@ -89,10 +90,7 @@ const ShowRecoveryPhraseScreen: React.FC & {
gap={20}
>
<Mnemonic words={mnemonic} onRevealWords={loadMnemonic} />
<Description>
This phrase is the only way to recover your account. Keep it secret,
keep it safe.
</Description>
<Description>{getRecoveryPhraseWarningMessage()}</Description>
</ExpandableBottomLayout.BottomSection>
</ExpandableBottomLayout.Layout>
);

View File

@@ -23,6 +23,7 @@ import useMnemonic from '@/hooks/useMnemonic';
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
import { STORAGE_NAME } from '@/services/cloud-backup';
import { useSettingStore } from '@/stores/settingStore';
import { getRecoveryPhraseWarningMessage } from '@/utils/crypto/mnemonic';
const SaveRecoveryPhraseScreen: React.FC = () => {
const [userHasSeenMnemonic, setUserHasSeenMnemonic] = useState(false);
@@ -55,8 +56,7 @@ const SaveRecoveryPhraseScreen: React.FC = () => {
Save your recovery phrase
</Title>
<Description style={{ paddingBottom: 10 }}>
This phrase is the only way to recover your account. Keep it secret,
keep it safe.
{getRecoveryPhraseWarningMessage()}
</Description>
</ExpandableBottomLayout.TopSection>
<ExpandableBottomLayout.BottomSection

View File

@@ -4,8 +4,19 @@
import { ethers } from 'ethers';
import { STORAGE_NAME } from '@/services/cloud-backup';
import type { Mnemonic } from '@/types/mnemonic';
/**
* Gets the recovery phrase warning message based on the current platform.
* The message mentions cloud backup options available for the OS.
* @returns The recovery phrase warning message
*/
export function getRecoveryPhraseWarningMessage(): string {
const cloudBackupName = STORAGE_NAME;
return `Using this phrase or ${cloudBackupName} backup are the only ways to recover your account. Keep it secret, keep it safe.`;
}
/**
* Type guard to check if an object is a valid Mnemonic
* @param obj The object to check