Skip to content

Commit

Permalink
fix: async check password
Browse files Browse the repository at this point in the history
  • Loading branch information
hz002 committed Dec 2, 2024
1 parent c51195a commit 6bf59d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { RootNames } from '@/constant/layout';

interface Props {
onDone: (isNoMnemonic?: boolean) => void;
shouldRedirect2SetPassword?: (any) => boolean;
shouldRedirect2SetPassword?: (any) => Promise<boolean>;
files: BackupData[];
}

Expand Down Expand Up @@ -51,7 +51,7 @@ export const SeedPhraseRestoreFromCloud2024: React.FC<Props> = ({
await new Promise(resolve => setTimeout(resolve, 500));
onDone();
if (
shouldRedirect2SetPassword?.({
await shouldRedirect2SetPassword?.({
backScreen: RootNames.ImportSuccess2024,
isFirstImportPassword: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { isSameAddress } = addressUtils;

export const RestoreFromCloud2024: React.FC<{
onDone: () => void;
shouldRedirect2SetPassword?: () => boolean;
shouldRedirect2SetPassword?: () => Promise<boolean>;
}> = ({ onDone, shouldRedirect2SetPassword }) => {
const [backups, setBackups] = React.useState<BackupData[]>();
const [loading, setLoading] = React.useState(true);
Expand Down

0 comments on commit 6bf59d2

Please sign in to comment.