mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
update text (#1600)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user