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

[Bug]: Multichain - When a user has an unapproved tx and tries to connect to another site, after accepting/rejecting the tx, the popup connect screen is opened and closed automatically without any action #25407

Closed
seaona opened this issue Jun 19, 2024 · 5 comments · Fixed by #25310
Labels
regression-RC-12.0.0 release-12.0.0 Issue or pull request that will be included in release 12.0.0 release-12.1.0 Issue or pull request that will be included in release 12.1.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-wallet-api-platform type-bug

Comments

@seaona
Copy link
Contributor

seaona commented Jun 19, 2024

Describe the bug

Whenever I have an unapproved transaction, if I go to another dapp and click Connect, once I accept/reject the pending transaction, I see how the popup is opened with the Connect screen and right after, is automatically closed without giving a chance to connect.

The wallet remains not connected after that.

Expected behavior

We should not close the popup and let the user proceed in the connect screen

Screenshots/Recordings

connect-disappears-pending-tx.mp4

Steps to reproduce

  1. Go to one dapp https://pancakeswap.finance/swap?chain=eth
  2. Connect
  3. Trigger a Swap
  4. Without accepting nor rejecting, go to a second dapp https://app.uniswap.org/
  5. Trigger Connect
  6. Now reject the transaction from step 3
  7. See how the tx is closed and popup is re-opened with the Connect screen, and right after is closed without giving me the chance to accept/reject the connection

Error messages or log output

No response

Version

12.0.0

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response

@seaona seaona added type-bug Sev2-normal Normal severity; minor loss of service or inconvenience. regression-RC-12.0.0 labels Jun 19, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Jun 19, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Jun 19, 2024
@darkwing
Copy link
Contributor

I can verify this is happening -- after rejecting the Swap transaction, I can see the "Sign in" contents just briefly before the popup closes itself.

@jiexi
Copy link
Contributor

jiexi commented Jun 20, 2024

This should be resolved by #25310

@jiexi jiexi closed this as completed in ba8d84e Jun 20, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Jun 20, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by severity Jun 20, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 20, 2024
jiexi added a commit that referenced this issue Jun 20, 2024
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

Bumps `@metamask/queued-request-controller` to `^1.0.0` in order to
handle the case where `eth_requestAccounts` requests that would not
cause a confirmation to be presented to the user (because they have
permitted some accounts for that dapp) would be stuck behind the request
queue when they could just be passed through.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25310?quickstart=1)

See: MetaMask/core#4423
Fixes: #25407

1. Open https://metamask.github.io/test-dapp/ and https://app.odos.xyz/,
connect to both
1. On the Test Dapp, send an EIP 1559 txn, but do not confirm/reject the
confirmation nor close the popup
1. Reload ODOS
1. ODOS should show that is connected to MetaMask in the top right of
the webpage
1. Open console on the ODOS page
1. run `await window.ethereum.request({method: 'eth_requestAccounts'})`,
it should return immediately with the permitted accounts

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

https://github.com/MetaMask/metamask-extension/assets/918701/b76607ef-b0a3-4943-b1d5-85f8cd766343

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] 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.

---------

Co-authored-by: MetaMask Bot <[email protected]>
@jiexi jiexi reopened this Jun 20, 2024
@github-project-automation github-project-automation bot moved this from Fixed to To be fixed in Bugs by severity Jun 20, 2024
@github-project-automation github-project-automation bot moved this from Fixed to To be fixed in Bugs by team Jun 20, 2024
jiexi added a commit that referenced this issue Jun 20, 2024
…#25451)

cherrypicks
ba8d84e
which bumps `queued-request-controller` to `^1.0.0` and fixes the
`eth_requestAccounts` handling bug


Merge conflicts on the lavamoat policies

Fixes: #25407

---------

Co-authored-by: MetaMask Bot <[email protected]>
@jiexi
Copy link
Contributor

jiexi commented Jun 20, 2024

this should be fixed in the V12 branch now

@metamaskbot metamaskbot added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Jun 21, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-12.0.0 on issue. Adding release label release-12.0.0 on issue, as issue is linked to PR #25310 which has this release label.

@danjm danjm closed this as completed Jun 24, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by severity Jun 24, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Jun 24, 2024
@jiexi
Copy link
Contributor

jiexi commented Jun 28, 2024

Verified fixed in #25098 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-RC-12.0.0 release-12.0.0 Issue or pull request that will be included in release 12.0.0 release-12.1.0 Issue or pull request that will be included in release 12.1.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-wallet-api-platform type-bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants