From 6bf59d2c4571e874b95c7a717c05b510ac817e4e Mon Sep 17 00:00:00 2001 From: hz002 Date: Mon, 2 Dec 2024 15:45:34 +0800 Subject: [PATCH] fix: async check password --- .../SeedPhraseRestoreFromCloud2024.tsx | 4 ++-- .../src/screens/RestoreFromCloud/RestoreFromCloud2024.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/mobile/src/components/SeedPhraseRestoreFromCloud/SeedPhraseRestoreFromCloud2024.tsx b/apps/mobile/src/components/SeedPhraseRestoreFromCloud/SeedPhraseRestoreFromCloud2024.tsx index dc0910833..dc87abe59 100644 --- a/apps/mobile/src/components/SeedPhraseRestoreFromCloud/SeedPhraseRestoreFromCloud2024.tsx +++ b/apps/mobile/src/components/SeedPhraseRestoreFromCloud/SeedPhraseRestoreFromCloud2024.tsx @@ -11,7 +11,7 @@ import { RootNames } from '@/constant/layout'; interface Props { onDone: (isNoMnemonic?: boolean) => void; - shouldRedirect2SetPassword?: (any) => boolean; + shouldRedirect2SetPassword?: (any) => Promise; files: BackupData[]; } @@ -51,7 +51,7 @@ export const SeedPhraseRestoreFromCloud2024: React.FC = ({ await new Promise(resolve => setTimeout(resolve, 500)); onDone(); if ( - shouldRedirect2SetPassword?.({ + await shouldRedirect2SetPassword?.({ backScreen: RootNames.ImportSuccess2024, isFirstImportPassword: true, }) diff --git a/apps/mobile/src/screens/RestoreFromCloud/RestoreFromCloud2024.tsx b/apps/mobile/src/screens/RestoreFromCloud/RestoreFromCloud2024.tsx index cd1b03381..46ce39695 100644 --- a/apps/mobile/src/screens/RestoreFromCloud/RestoreFromCloud2024.tsx +++ b/apps/mobile/src/screens/RestoreFromCloud/RestoreFromCloud2024.tsx @@ -28,7 +28,7 @@ const { isSameAddress } = addressUtils; export const RestoreFromCloud2024: React.FC<{ onDone: () => void; - shouldRedirect2SetPassword?: () => boolean; + shouldRedirect2SetPassword?: () => Promise; }> = ({ onDone, shouldRedirect2SetPassword }) => { const [backups, setBackups] = React.useState(); const [loading, setLoading] = React.useState(true);