Skip to content

Commit

Permalink
fix: disable balance checker for Sepolia in account tracker (#27763)
Browse files Browse the repository at this point in the history
<!--
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.
-->

This PR resolves a bug introduced in [PR
#27258](#27258),
where a change enabled the use of the balance checker for the Sepolia
network.

Line that caused the bug:
https://github.com/MetaMask/metamask-extension/pull/27258/files#diff-1acb7898d60977530c97169551d22dbe477a4e3aeb74f1f14bf2eea0b4d75d35R695
(be sure to expand the changes in
`app/scripts/controllers/account-tracker-controller.ts`)

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

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

## **Related issues**

Fixes:

## **Manual testing steps**

1. Switch to the current `develop` branch.
2. Run the extension and open the service worker console.
3. Attempt to open the extension.
4. You should see the following warning:

   ```
MetaMask - Account Tracker single call balance fetch failed Error:
resolver or addr is not configured for ENS name (argument="name",
value="", code=INVALID_ARGUMENT, version=contracts/5.7.0)

   (anonymous)    @   sentry-install.js:37777
_updateAccountsViaBalanceChecker2 @ account-tracker-controller.ts:825
   await in _updateAccountsViaBalanceChecker2       
   updateAccounts   @   account-tracker-controller.ts:704
   start   @   account-tracker-controller.ts:306
   triggerNetworkrequests   @   metamask-controller.js:2394
   (anonymous)    @   metamask-controller.js:1653
   setupControllerConnection   @   metamask-controller.js:5110
   setupTrustedCommunication   @   metamask-controller.js:4984
   connectRemote   @   background.js:846
   (anonymous)    @   background.js:340
   ```

5. Switch to my PR and repeat steps 2 and 3.
6. The warning should no longer appear.

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] 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.

## **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.
  • Loading branch information
cryptodev-2s authored Oct 12, 2024
1 parent f2f180b commit f9ec0e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/scripts/constants/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const SINGLE_CALL_BALANCES_ADDRESSES = {
[CHAIN_IDS.MAINNET]: '0xb1f8e55c7f64d203c1400b9d8555d050f94adf39',
[CHAIN_IDS.GOERLI]: '0x9788C4E93f9002a7ad8e72633b11E8d1ecd51f9b',
// TODO(SEPOLIA) There is currently no balance call address for Sepolia
[CHAIN_IDS.SEPOLIA]: '',
// [CHAIN_IDS.SEPOLIA]: '',
[CHAIN_IDS.BSC]: '0x2352c63A83f9Fd126af8676146721Fa00924d7e4',
[CHAIN_IDS.OPTIMISM]: '0xB1c568e9C3E6bdaf755A60c7418C269eb11524FC',
[CHAIN_IDS.POLYGON]: '0x2352c63A83f9Fd126af8676146721Fa00924d7e4',
Expand Down

0 comments on commit f9ec0e0

Please sign in to comment.