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: fix ConnectPage when a non-EVM account is selected #28436

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ccharly
Copy link
Contributor

@ccharly ccharly commented Nov 13, 2024

Description

The currently selected non-EVM account was part of the requested account on during the account connection flow. The ConnectPage was allowing to "confirm" the request even if the UI was showing 0 account.

To fix this, we no longer uses the currently selected account if this account is not EVM-compatible.

Open in GitHub Codespaces

Related issues

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

Manual testing steps

  1. yarn start:flask
  2. Enable Bitcoin support
  3. Create a Bitcoin account
  4. Select this account
  5. Go to: https://metamask.github.io/test-dapp/
  6. Try to connect your accounts
    • None accounts should be selected by default
    • You should not be able to "confirm" the dialog

Screenshots/Recordings

Before

Screenshot 2024-11-13 at 14 57 11

If you try to connect, you will get:

Screenshot 2024-11-13 at 14 57 44

After

Screenshot 2024-11-13 at 15 01 39

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.

@ccharly ccharly self-assigned this Nov 13, 2024
@ccharly ccharly requested a review from a team as a code owner November 13, 2024 13:02
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.

@metamaskbot
Copy link
Collaborator

Builds ready [3a8d449]
Page Load Metrics (1898 ± 55 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint17172180189811354
domContentLoaded17042170186710450
load17162183189811455
domInteractive21256655727
backgroundConnect779332110
firstReactRender8911910173
getState56121199
initialActions01000
loadScripts1222167013709345
setupStore65612147
uiStartup19122393210112359
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 23 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants