Skip to content

Commit

Permalink
fix: address not showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
guru-web3 committed Dec 12, 2024
1 parent cbb9d2e commit ef21239
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions demo/redirect-flow-example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,7 @@ function App() {
await passkeyPlugin.initWithMpcCoreKit(coreKitInstance);
setIsLoading(false);
}
if (coreKitInstance.status === COREKIT_STATUS.LOGGED_IN) {
await setupProvider();
setUserInformation();
setIsLoading(false);
}
setupProviderPostLogin();

if (coreKitInstance.status === COREKIT_STATUS.REQUIRED_SHARE) {
navigate("/recovery");
Expand All @@ -158,6 +154,14 @@ function App() {
setCoreKitStatus(coreKitInstance.status);
};

const setupProviderPostLogin = async () => {
if (coreKitInstance.status === COREKIT_STATUS.LOGGED_IN) {
await setupProvider();
setUserInformation();
setIsLoading(false);
}
}

useEffect(() => {
const checkForRecoveryInitiation = async () => {
if (coreKitInstance.status === COREKIT_STATUS.REQUIRED_SHARE) {
Expand All @@ -168,6 +172,7 @@ function App() {
}
}
checkForRecoveryInitiation();
setupProviderPostLogin();
}, [coreKitStatus])

useEffect(() => {
Expand Down

0 comments on commit ef21239

Please sign in to comment.