Defer post-login hydration to async follow-up

This commit is contained in:
thePR0M3TH3AN committed 2025-10-09 16:37:23 -04:00
1 parent f61563d2e2
commit 0a3057d081
3 files changed
+111 -10

No files matched your search

+18
View File
@@ -3856,6 +3856,11 @@ export class ProfileModalController {
}
async handleAuthLogin(detail = {}) {
const postLoginPromise =
detail && typeof detail.postLoginPromise?.then === "function"
? detail.postLoginPromise
: Promise.resolve(detail?.postLogin ?? null);
const savedProfiles = Array.isArray(detail?.savedProfiles)
? detail.savedProfiles
: null;
@@ -3893,6 +3898,19 @@ export class ProfileModalController {
this.populateProfileRelays();
this.refreshWalletPaneState();
postLoginPromise
.then(() => {
this.populateBlockedList();
this.populateProfileRelays();
this.refreshWalletPaneState();
})
.catch((error) => {
console.warn(
"[profileModal] Failed to hydrate deferred login data:",
error,
);
});
return true;
}