Skip to content

Commit ef21239

Browse files
author
Guru
committed
fix: address not showing up
1 parent cbb9d2e commit ef21239

File tree

1 file changed

+10
-5
lines changed
  • demo/redirect-flow-example/src

1 file changed

+10
-5
lines changed

demo/redirect-flow-example/src/App.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,7 @@ function App() {
142142
await passkeyPlugin.initWithMpcCoreKit(coreKitInstance);
143143
setIsLoading(false);
144144
}
145-
if (coreKitInstance.status === COREKIT_STATUS.LOGGED_IN) {
146-
await setupProvider();
147-
setUserInformation();
148-
setIsLoading(false);
149-
}
145+
setupProviderPostLogin();
150146

151147
if (coreKitInstance.status === COREKIT_STATUS.REQUIRED_SHARE) {
152148
navigate("/recovery");
@@ -158,6 +154,14 @@ function App() {
158154
setCoreKitStatus(coreKitInstance.status);
159155
};
160156

157+
const setupProviderPostLogin = async () => {
158+
if (coreKitInstance.status === COREKIT_STATUS.LOGGED_IN) {
159+
await setupProvider();
160+
setUserInformation();
161+
setIsLoading(false);
162+
}
163+
}
164+
161165
useEffect(() => {
162166
const checkForRecoveryInitiation = async () => {
163167
if (coreKitInstance.status === COREKIT_STATUS.REQUIRED_SHARE) {
@@ -168,6 +172,7 @@ function App() {
168172
}
169173
}
170174
checkForRecoveryInitiation();
175+
setupProviderPostLogin();
171176
}, [coreKitStatus])
172177

173178
useEffect(() => {

0 commit comments

Comments
 (0)