Skip to content

Commit

Permalink
fix: fix checksum address for balance check
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-fehri committed Jun 27, 2024
1 parent cf21813 commit 5e758b7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion patches/@metamask+assets-controllers+30.0.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,18 @@ index 8c506d9..d1ec2d2 100644
},
{}
diff --git a/node_modules/@metamask/assets-controllers/dist/chunk-V4ZO3F2S.js b/node_modules/@metamask/assets-controllers/dist/chunk-V4ZO3F2S.js
index 0430e5c..dee32be 100644
index 0430e5c..038398c 100644
--- a/node_modules/@metamask/assets-controllers/dist/chunk-V4ZO3F2S.js
+++ b/node_modules/@metamask/assets-controllers/dist/chunk-V4ZO3F2S.js
@@ -61,7 +61,7 @@ var AccountTrackerController = class extends _pollingcontroller.StaticIntervalPo
this.syncAccounts(chainId);
const { accounts, accountsByChainId } = this.state;
const isMultiAccountBalancesEnabled = this.getMultiAccountBalancesEnabled();
- const accountsToUpdate = isMultiAccountBalancesEnabled ? Object.keys(accounts) : [this.getSelectedAddress()];
+ const accountsToUpdate = isMultiAccountBalancesEnabled ? Object.keys(accounts) : [_controllerutils.toChecksumHexAddress.call(void 0, this.getSelectedAddress())];
const accountsForChain = { ...accountsByChainId[chainId] };
for (const address of accountsToUpdate) {
const balance = await this.getBalanceFromChain(address, ethQuery);
@@ -80,9 +80,11 @@ var AccountTrackerController = class extends _pollingcontroller.StaticIntervalPo
[chainId]: accountsForChain
}
Expand Down

0 comments on commit 5e758b7

Please sign in to comment.