Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning MetaMask internal reviewing guidelines:
Ignoring alerts on:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| if (source) { | ||
| url.searchParams.set("source", source); | ||
| } | ||
| await get<void>(url.toString()); |
There was a problem hiding this comment.
Authorization request drops useAPIKey option
High Severity
The old authorization code passed { useAPIKey: true } as the options argument to both the post and get calls, ensuring the configured API key was included in the request. The new get call at line 398 omits this option entirely. Every other similar HTTP call in the codebase (e.g., in metadataUtils.ts) still passes { useAPIKey: true }. If the citadel server requires the API key for authorization, all retrieveOrImportShare calls will fail.
|
@SocketSecurity ignore npm/vite@8.0.1 Both the deps are only used for dev deps |
chaitanyapotti
left a comment
There was a problem hiding this comment.
Tested against local server for now.
Tests are failing since prod server isn't live yet.
This is fine for now since this sdk isn't being used yet


Jira Link
Description
Upgrade deps and use build env
How has this been tested?
Screenshots (if appropriate)
Types of changes
Checklist
Note
Medium Risk
Moderate risk because it changes how the SDK selects signer/metadata endpoints (new
buildEnvparam and Citadel allow URL), which could affect key retrieval/import flows if the environment mapping is wrong; the rest is dependency/version updates.Overview
Bumps
@toruslabs/torus.jsto17.2.0and updates runtime/dev dependencies (notably@toruslabs/constants/fetch-node-details, plusvite/vitestand related lockfile changes).Introduces an optional
buildEnvconstructor option and threads it through share retrieval/import so legacy metadata host selection is based onLEGACY_METADATA_MAP[buildEnv]and the “allow” gating call is routed viaCITADEL_SERVER_MAP[buildEnv]/v1/signer/allow(removing the previousauthorizationServerUrl/SIGNER_MAPpath).Written by Cursor Bugbot for commit c5bf756. This will update automatically on new commits. Configure here.