fix: Fix network picker in IAB not reflecting dapp selected network#28285
fix: Fix network picker in IAB not reflecting dapp selected network#28285
Conversation
There was a problem hiding this comment.
These changes can be pulled into a separate PR
There was a problem hiding this comment.
this can be reverted. My local android build isn't working without this
There was a problem hiding this comment.
Ok weird. No idea. lets revert before we merge I think
There was a problem hiding this comment.
can be reverted. my ios build isn't working without this
app/components/UI/Navbar/index.js
Outdated
| * @param {bool} disableNetwork - Boolean that specifies if the network can be changed, defaults to false | ||
| * @returns {Object} - Corresponding navbar options containing headerTitle, headerLeft, headerTruncatedBackTitle and headerRight | ||
| */ | ||
| export function getTransactionsNavbarOptions( |
There was a problem hiding this comment.
So this just wasn't used and this is a cleanup on the side?
There was a problem hiding this comment.
Oh I see you would've had to add a prop and this component is just not used 👍
There was a problem hiding this comment.
I want to remove it to make it clear that AccountRightButton will always be called with dappOrigin. Removing this does that
…31/fix-network-picker-iab-fullscreen
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28285 +/- ##
==========================================
+ Coverage 82.66% 82.90% +0.23%
==========================================
Files 4866 4873 +7
Lines 126134 126361 +227
Branches 28268 28330 +62
==========================================
+ Hits 104273 104754 +481
+ Misses 14660 14398 -262
- Partials 7201 7209 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key impacts:
The change is a clean refactoring (moving URL parsing responsibility up the component tree) but touches a critical path for dApp browser interactions and network/chain permission flows. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|



Description
Fixes a bug where the network selector icon in the In-App Browser was stuck displaying the global selected network due to incorrect dapp origin information being used
Changelog
CHANGELOG entry: Fixed a bug where the network selector icon in the In-App Browser would not correctly reflect the currently selected network for the dapp
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/WAPI-1031
Manual testing steps
Screenshots/Recordings
Before
Screen.Recording.2026-04-01.at.11.55.11.AM.mov
After
Screen.Recording.2026-04-01.at.11.44.32.AM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: scoped UI/navigation parameter plumbing to ensure per-dapp network context is used; main risk is callers missing the new required
dappOriginprop or origin parsing yielding empty origin in edge URLs.Overview
Fixes the In-App Browser network picker/avatar to reflect the dapp-selected network by threading an explicit
dappOriginthroughBrowserUrlBarintoAccountRightButton.AccountRightButtonno longer derives origin from navigation route params; it now usesdappOriginforuseNetworkInfoand includes it ashostInfo.metadata.originwhen opening theNetworkSelectorsheet, so the selector can resolve the per-origin network. Tests were updated accordingly to supply a non-emptydappOriginand remove theuseRoutemock.Written by Cursor Bugbot for commit 9c4cbaa. This will update automatically on new commits. Configure here.