MetaMask / MetaMask/metamask-extension
[Bug]: Snaps - Multiple requests to non-EVM Infura for transaction Activity are done repeatedly even if another network is selected
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### Describe the bug
Multiple requests are done repeatedly to nonEVM Infura RPC to get transaction activity, even if an EVM network is selected. These are the ones:
- 11 requests to https://bitcoin-mainnet.infura.io/../txs
- 1 request to : https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d/v1/accounts/TCsCozJBfiHoZG2bj5CTmVmLkA29ZMzEwB/transactions
- 1 request to https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d/v1/accounts/TCsCozJBfiHoZG2bj5CTmVmLkA29ZMzEwB/transactions/trc20
### Expected behavior
It seems unnecessary to be performing those requests over an over for getting Transaction Activity, when I have another network selected
### Screenshots/Recordings
https://github.com/user-attachments/assets/fd4f8ef3-cabc-4a70-a561-9a023a1ae1df
### Steps to reproduce
1. Select an EVM network ie Ethereum
2. Observe the offscreen.htlm requests.
### Error messages or log output
```shell
```
### Where was this bug found?
Live version (from official store)
### Version
13.26.0 and possibly earlier
### Build type
None
### Browser
Chrome
### Operating system
MacOS
### Hardware wallet
_No response_
### Additional context
_No response_
### Severity
_No response_
[Jira issue](https://consensyssoftware.atlassian.net/browse/MCTP-274)
### Expected behavior
No response
### Screenshots/Recordings
No response
### Steps to reproduce
1. Select an EVM network ie Ethereum
2. Observe the offscreen.htlm requests.
### Error messages or log output
```shell
```
### Where was this bug found?
No response
### Version
13.26.0 and possibly earlier
### Build number
No response
### Build type
None
### Browser
Chrome
### Operating system
MacOS
### Hardware wallet
No response
### Additional context
No response
### Severity
Sev2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the live extension by selecting Ethereum and observing offscreen.html requests in Chrome. Trace the transaction-activity request path to determine why Bitcoin and Tron Infura endpoints are queried repeatedly despite an EVM network being selected. Done means those unnecessary non-EVM requests no longer repeat under this condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- networking, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100