-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Updated selector for the test networks #23986
Conversation
ui/selectors/selectors.js
Outdated
@@ -1436,6 +1436,7 @@ export const getConnectedSitesList = createDeepEqualSelector( | |||
getAllConnectedAccounts, | |||
(connectedSubjectsForAllAddresses, identities, connectedAddresses) => { | |||
const sitesList = {}; | |||
console.log(sitesList) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs removal
ui/selectors/selectors.js
Outdated
@@ -1467,7 +1468,8 @@ export const getConnectedSitesListWithNetworkInfo = createDeepEqualSelector( | |||
const connectedNetwork = networks.find( | |||
(network) => network.id === domains[siteKey], | |||
); | |||
sitesList[siteKey].networkIconUrl = connectedNetwork.rpcPrefs.imageUrl; | |||
// For the testnets, if we do not have an image, we will have a fallback string | |||
sitesList[siteKey].networkIconUrl = connectedNetwork.rpcPrefs ? connectedNetwork.rpcPrefs.imageUrl : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be:
connectedNetwork.rpcPrefs??.imageUrl || ''
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #23986 +/- ##
===========================================
- Coverage 67.53% 67.53% -0.00%
===========================================
Files 1245 1245
Lines 48848 48848
Branches 12743 12746 +3
===========================================
- Hits 32989 32987 -2
- Misses 15859 15861 +2 ☔ View full report in Codecov by Sentry. |
Builds ready [f050198]
Page Load Metrics (1981 ± 736 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This PR is to ensure that the permissions page renders list of all the permissions with the current networks. For a few networks, we don't have the rpcPrefs that was causing the siteKey nd the rpcPrefs to be undefined.
This PR also makes sure that the defined background color is there for the test networks that doesn't have a logo
Related issues
Fixes: #23812 #23793
Manual testing steps
Screenshots/Recordings
Before
Screen.Recording.2024-04-12.at.12.00.01.AM.mov
After
Screen.Recording.2024-04-11.at.11.58.43.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist