Skip to content
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

chore: Pass along hashed rpcUrl during CustomNetworkAdded event #26203

Merged
merged 8 commits into from
Jul 30, 2024

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Jul 29, 2024

Description

Pass along hashed rpcUrl when added as a custom network. We are hashing the rpcUrl for privacy reasons, so that no custom rpcUrls get leaked. For instance, this would be important for those running their own ETH nodes.

When leveraging this new value, analytics should also hash rpcUrls of common rpc's on chainlist, then compare the hashes. Note that I opted not to use the URL constructor, since it will enforce trailing / on base urls when I am noticing that most urls on chainlist do not have this: https://chainlist.org/chain/1

Open in GitHub Codespaces

Related issues

Fixes: MMASSETS-298 mobile PR also needs to be added.

Manual testing steps

Add CustomNetwork and ensure that the proper payload is sent in the network tab when CustomNetworkAdded event fires off.

Screenshots/Recordings

N/A

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

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.

@gambinish gambinish marked this pull request as ready for review July 30, 2024 17:16
@gambinish gambinish requested a review from a team as a code owner July 30, 2024 17:16
@gambinish gambinish requested a review from sahar-fehri July 30, 2024 18:25
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.96%. Comparing base (a26c725) to head (1e05cac).
Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #26203   +/-   ##
========================================
  Coverage    69.96%   69.96%           
========================================
  Files         1411     1411           
  Lines        49946    49946           
  Branches     13805    13805           
========================================
  Hits         34942    34942           
  Misses       15004    15004           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@metamaskbot
Copy link
Collaborator

Builds ready [8eea39d]
Page Load Metrics (333 ± 304 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint602521094220
domContentLoaded95427167
load382050333633304
domInteractive95427167
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 677 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [1e05cac]
Page Load Metrics (348 ± 314 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint873611225828
domContentLoaded105825136
load461948348654314
domInteractive105825146
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 677 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@gambinish gambinish merged commit 5bf8aa7 into develop Jul 30, 2024
75 checks passed
@gambinish gambinish deleted the chore/mmassets-298_capture-custom-rpc-url branch July 30, 2024 22:20
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2024
@metamaskbot metamaskbot added the release-12.4.0 Issue or pull request that will be included in release 12.4.0 label Jul 30, 2024
@gauthierpetetin gauthierpetetin added release-12.3.0 Issue or pull request that will be included in release 12.3.0 and removed release-12.4.0 Issue or pull request that will be included in release 12.4.0 labels Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants