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

fix: support multichain in blockexplorer and qr code #25526

Merged
merged 26 commits into from
Jul 2, 2024

Conversation

montelaidev
Copy link
Contributor

@montelaidev montelaidev commented Jun 26, 2024

Description

This PR updates the block explorer to support non-EVM explorers and fixes the QR code to also display non-EVM accounts.

Related issues

Fixes https://github.com/MetaMask/accounts-planning/issues/489

Manual testing steps

EVM

  1. Click on global menu and click on View on Explorer
  2. See that the user goes to etherscan
  3. Click on the account details
  4. Click on copy address to clipboard and verify that the address is a 0x prefixed.
  5. Verify QR code is also ethereum: prefixed

Non-EVM

  1. Create a BTC account
  2. Click on global menu and click on View on Explorer
  3. See that the user goes to blockstream.io
  4. Click on the account details
  5. Click on copy address to clipboard and verify that the address is not 0x prefixed.
  6. Verify QR code is only the btc address

Screenshots/Recordings

Before

Screenshot 2024-06-26 at 23 14 46
Screenshot 2024-06-26 at 23 14 18
Screenshot 2024-06-26 at 23 14 28

After

Screenshot 2024-06-26 at 23 14 40
Screenshot 2024-06-26 at 23 14 37
Screenshot 2024-06-26 at 23 14 32

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.

@montelaidev montelaidev changed the title Fix/qr and blockexplore for multichain fix: support multichain in blockexplorer and qr code Jun 26, 2024
@montelaidev montelaidev self-assigned this Jun 26, 2024
@montelaidev montelaidev force-pushed the fix/qr-and-blockexplore-for-multichain branch from 9e0a145 to edcc72c Compare June 26, 2024 15:43
@montelaidev montelaidev force-pushed the fix/qr-and-blockexplore-for-multichain branch from f4d0246 to 5280b97 Compare June 27, 2024 07:44
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.65%. Comparing base (4886a3f) to head (0df3873).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #25526      +/-   ##
===========================================
+ Coverage    69.60%   69.65%   +0.05%     
===========================================
  Files         1364     1365       +1     
  Lines        48173    48185      +12     
  Branches     13291    13293       +2     
===========================================
+ Hits         33527    33559      +32     
+ Misses       14646    14626      -20     

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

@montelaidev montelaidev marked this pull request as ready for review June 27, 2024 08:18
@montelaidev montelaidev requested a review from a team as a code owner June 27, 2024 08:18
@metamaskbot
Copy link
Collaborator

Builds ready [6fa8eed]
Page Load Metrics (49 ± 3 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6110481105
domContentLoaded9131011
load41634973
domInteractive9131011
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.46 KiB (0.05%)
  • common: 160 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [6d9cf20]
Page Load Metrics (63 ± 8 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6111990188
domContentLoaded95721126
load399163168
domInteractive95721126
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.46 KiB (0.05%)
  • common: 160 Bytes (0.00%)

shared/constants/multichain/networks.ts Outdated Show resolved Hide resolved
shared/constants/multichain/networks.ts Outdated Show resolved Hide resolved
test/e2e/tests/dapp-interactions/block-explorer.spec.js Outdated Show resolved Hide resolved
ui/helpers/utils/multichain/blockExplorer.ts Outdated Show resolved Hide resolved
ui/helpers/utils/multichain/blockExplorer.ts Outdated Show resolved Hide resolved
ui/helpers/utils/multichain/blockExplorer.ts Outdated Show resolved Hide resolved
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
@metamaskbot
Copy link
Collaborator

Builds ready [848b52a]
Page Load Metrics (253 ± 245 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint671801152713
domContentLoaded117133168
load441869253509245
domInteractive117133168
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.34 KiB (0.05%)
  • common: 160 Bytes (0.00%)

shared/constants/multichain/networks.ts Outdated Show resolved Hide resolved
ui/selectors/multichain.ts Outdated Show resolved Hide resolved
ui/helpers/utils/multichain/blockExplorer.ts Outdated Show resolved Hide resolved
ui/helpers/utils/multichain/blockExplorer.test.ts Outdated Show resolved Hide resolved
ui/helpers/utils/multichain/blockExplorer.test.ts Outdated Show resolved Hide resolved
ui/helpers/utils/multichain/blockExplorer.test.ts Outdated Show resolved Hide resolved
ui/components/ui/qr-code-view/qr-code-view.test.tsx Outdated Show resolved Hide resolved
montelaidev and others added 3 commits July 2, 2024 16:10
ui/helpers/utils/multichain/blockExplorer.ts Outdated Show resolved Hide resolved
ui/selectors/multichain.ts Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Jul 2, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [0df3873]
Page Load Metrics (363 ± 325 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint662861184522
domContentLoaded988312010
load492402363677325
domInteractive988312010
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.02 KiB (0.04%)
  • common: 160 Bytes (0.00%)

Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - manual tested it

Screen.Recording.2024-07-02.at.11.10.52.AM.mov

@montelaidev montelaidev merged commit dfad34b into develop Jul 2, 2024
73 checks passed
@montelaidev montelaidev deleted the fix/qr-and-blockexplore-for-multichain branch July 2, 2024 15:27
@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2024
@metamaskbot metamaskbot added the release-12.2.0 Issue or pull request that will be included in release 12.2.0 label Jul 2, 2024
@k-g-j
Copy link
Contributor

k-g-j commented Sep 3, 2024

Verified on Chrome Version 128.0.6613.120
Ethereum Case ✅

25526-eth-test-chrome.mov

Bitcoin Case ✅

25526-btc-test-chrome.mov

Verified on Firefox 129.0.2
Ethereum Case ✅

25526-eth-test-firefox.mov

Bitcoin Case ✅

25526-btc-test-firefox.mov

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.2.0 Issue or pull request that will be included in release 12.2.0 team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants