Conversation
|
@metamaskbot publish-preview |
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a89313e. Configure here.
| ): Promise<void> => { | ||
| console.log(`[PERFORMANCE DEBUG] createMultichainAccountGroupsBatch - Creating ${maxGroupIndex + 1} account groups (batch) for entropy source: ${entropySourceId}`); | ||
| console.log(`[PERFORMANCE DEBUG] createMultichainAccountGroupsBatch - Max group index: ${maxGroupIndex}`); | ||
| console.log(`[PERFORMANCE DEBUG] createMultichainAccountGroupsBatch - Context: ${JSON.stringify(context)}`); |
There was a problem hiding this comment.
JSON.stringify(context) will throw on circular references
High Severity
JSON.stringify(context) will throw a TypeError: Converting circular structure to JSON because BackupAndSyncContext contains controller: this (the full AccountTreeController instance) and messenger (a complex event system), which almost certainly have circular references. This unhandled error will crash createMultichainAccountGroupsBatch before any account groups are created.
Reviewed by Cursor Bugbot for commit a89313e. Configure here.
| ): Promise<void> => { | ||
| console.log(`[PERFORMANCE DEBUG] createMultichainAccountGroupsBatch - Creating ${maxGroupIndex + 1} account groups (batch) for entropy source: ${entropySourceId}`); | ||
| console.log(`[PERFORMANCE DEBUG] createMultichainAccountGroupsBatch - Max group index: ${maxGroupIndex}`); | ||
| console.log(`[PERFORMANCE DEBUG] createMultichainAccountGroupsBatch - Context: ${JSON.stringify(context)}`); |
There was a problem hiding this comment.
Debug console.log statements committed to production code
Medium Severity
Multiple [PERFORMANCE DEBUG] console.log statements are added across production library code in a published npm package. These are clearly temporary debugging statements (prefixed with [PERFORMANCE DEBUG]), and will generate noisy output for all consumers. Some also serialize potentially sensitive data like options and context objects via JSON.stringify.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit a89313e. Configure here.
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |


Note
Medium Risk
Adds extensive
console.logperformance/debug output (includingJSON.stringify(context)) and changesMultichainAccountService#createMultichainAccountGroupsto wait for all providers, which can increase latency and alter behavior in Snap-dependent flows.Overview
Adds performance debug logging across backup/sync and multichain account creation paths, including timing (
performance.now()) and counts for group/account creation increateMultichainAccountGroupsBatch,MultichainAccountService#createMultichainAccountGroups,MultichainAccountWallet#buildGroupStateForRange, andSnapAccountProvider#createAccounts.Also changes
MultichainAccountService#createMultichainAccountGroupsto call wallet creation withwaitForAllProvidersToFinishCreatingAccounts: true(previouslyfalse), meaning batch group creation now blocks on non-EVM/Snap providers instead of returning early.Reviewed by Cursor Bugbot for commit a89313e. Bugbot is set up for automated code reviews on this repo. Configure here.