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 patch missing variable sentry error #12371

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions patches/@metamask+assets-controllers+43.1.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ index a34725f..21e9d20 100644
address?: string;
attributes?: Attributes[];
diff --git a/node_modules/@metamask/assets-controllers/dist/TokenBalancesController.cjs b/node_modules/@metamask/assets-controllers/dist/TokenBalancesController.cjs
index 6f48d64..f9dc513 100644
index 6f48d64..e1532fa 100644
--- a/node_modules/@metamask/assets-controllers/dist/TokenBalancesController.cjs
+++ b/node_modules/@metamask/assets-controllers/dist/TokenBalancesController.cjs
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
Expand All @@ -186,8 +186,15 @@ index 6f48d64..f9dc513 100644
this.messagingSystem.subscribe('TokensController:stateChange', ({ tokens: newTokens, detectedTokens }) => {
__classPrivateFieldSet(this, _TokenBalancesController_tokens, [...newTokens, ...detectedTokens], "f");
// TODO: Either fix this lint violation or explain why it's necessary to ignore.
@@ -113,21 +115,28 @@ class TokenBalancesController extends base_controller_1.BaseController {
@@ -108,26 +110,34 @@ class TokenBalancesController extends base_controller_1.BaseController {
* Updates balances for all tokens.
*/
async updateBalances() {
- if (__classPrivateFieldGet(this, _TokenBalancesController_disabled, "f")) {
+ if (__classPrivateFieldGet(this, _TokenBalancesController_disabled, "f") || __classPrivateFieldGet(this, _TokenBalancesController_updateInProgress, "f")) {
return;
}
+ __classPrivateFieldSet(this, _TokenBalancesController_updateInProgress, true, "f");
const selectedInternalAccount = this.messagingSystem.call('AccountsController:getSelectedAccount');
const newContractBalances = {};
- for (const token of __classPrivateFieldGet(this, _TokenBalancesController_tokens, "f")) {
Expand Down Expand Up @@ -220,11 +227,11 @@ index 6f48d64..f9dc513 100644
this.update((state) => {
state.contractBalances = newContractBalances;
});
+ __classPrivateFieldSet(this, _TokenBalancesController_updateInProgress, updateInProgress, "f");
+ __classPrivateFieldSet(this, _TokenBalancesController_updateInProgress, false, "f");
}
/**
* Reset the controller state to the default state.
@@ -139,6 +148,6 @@ class TokenBalancesController extends base_controller_1.BaseController {
@@ -139,6 +149,6 @@ class TokenBalancesController extends base_controller_1.BaseController {
}
}
exports.TokenBalancesController = TokenBalancesController;
Expand Down
Loading