fix(passport,wallet): prevent login popup on page load and fix wallet address display after OAuth redirect#2801
Merged
Merged
Conversation
… LOGGED_IN - Add silent option to GetUserFunction to avoid popup when checking session on page load - Add LOGGED_IN listener in ZkEvmProvider to emit ACCOUNTS_CHANGED after redirect login - Fixes Issue 1: popup opening automatically on load - Fixes Issue 2: UI not updating after login via redirect
|
View your CI Pipeline Execution ↗ for commit 6a86e73
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit e7c4513
☁️ Nx Cloud last updated this comment at |
e7c4513 to
295311f
Compare
JCSanPedro
reviewed
Mar 18, 2026
… redirect - Add LOGGED_IN listener in zkEvmProvider to emit accountsChanged - Remove redundant #callSessionActivity from handleLoggedIn - Add connectWallet silent/non-silent flow tests - Add zkEvmProvider LOGGED_IN test
JCSanPedro
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix 2 issues in SDK 2.12.7
Summary
This PR addresses Issues 1 and 2 reported after upgrading to
@imtbl/sdk ^2.12.7in the Treeverse integration. Seedocs/TREEVERSE_ISSUES_ANALYSIS.mdfor the full analysis.Issue 1: Passport login popup opens automatically on page load
Expected: Login popup should only appear when the user clicks "Connect Wallet" (which calls
eth_requestAccounts).Fix: Added
silentparameter toGetUserFunction. WhenconnectEvm()runs on page load, it now callsgetUser(undefined, { silent: true })to avoid triggeringloginWithPopup().Packages: wallet, passport
Issue 2: UI does not update after successful login (redirect)
Expected: After OAuth redirect, the navbar should immediately show the connected wallet address.
Fix: Added
LOGGED_INlistener toZkEvmProvider. When the user returns from redirect,loginCallback()emitsLOGGED_INand the provider now emitsACCOUNTS_CHANGEDso the UI updates.Packages: wallet
How to test locally
Issue 1: Popup on page load
Setup:
Test flow:
Location:
packages/passport/sdk-sample-app/src/components/TreeverseFlowSimulation.tsxIssue 2: UI not updating after redirect
Setup:
Test flow:
/login/redirect-callbackloginCallbackLocation:
packages/passport/sdk-sample-app/src/pages/login/redirect-callback.page.tsx