Skip to content

fix: batch sell submit not working cp-7.82.0#31654

Open
infiniteflower wants to merge 2 commits into
mainfrom
fix/batchSell-txs-not-submitted
Open

fix: batch sell submit not working cp-7.82.0#31654
infiniteflower wants to merge 2 commits into
mainfrom
fix/batchSell-txs-not-submitted

Conversation

@infiniteflower

@infiniteflower infiniteflower commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Batch Sell submit was failing before any transaction reached the wallet or Activity tab. BridgeStatusController.submitBatchSell calls generateBatchId() from @metamask/transaction-controller when building a batch-sell transaction batch, but Mobile had a Yarn resolution pinning @metamask/transaction-controller to 67.0.0, which does not export that helper. generateBatchId was added in 67.1.0 (see upstream changelog), while bridge-status-controller already depends on ^67.1.0.

This PR removes the stale 67.0.0 resolution so the existing ^67.1.0 dependency resolves correctly. After the lockfile update, Batch Sell submit proceeds past controller submission and transactions appear in Activity as expected.

Changelog

CHANGELOG entry: Fixed Batch Sell transactions not submitting due to a missing generateBatchId export from an outdated @metamask/transaction-controller resolution.

Related issues

Fixes: #31666

Manual testing steps

Feature: Batch Sell transaction submission

  Scenario: user submits a Batch Sell from final review
    Given Batch Sell is enabled and the user has multiple sellable tokens on a supported chain (e.g. Ethereum mainnet)
    And the user has selected a destination stablecoin and received quotes on the review screen
    And network fees have loaded and "Sell all" is enabled on the final review modal

    When the user taps "Sell all" and completes signing/confirmation if prompted

    Then submit succeeds without a `generateBatchId is not a function` error in Metro logs
    And pending/submitted swap transactions appear in Activity
    And the batch sell flow navigates to the Transactions view after submit

Additional verification:

  • Run yarn install on a clean checkout and confirm node_modules/@metamask/transaction-controller resolves to 67.1.0 (not 67.0.0).
  • Confirm generateBatchId is exported from @metamask/transaction-controller (e.g. present in dist/index.d.cts).

Screenshots/Recordings

N/A — dependency/version fix only; no UI change. Manual testing evidence: Activity list showing Batch Sell transactions after submit, and Metro logs free of generateBatchId is not a function.

Before

N/A

After

Screenshot 2026-06-12 at 2 46 10 PM Screenshot 2026-06-12 at 2 46 12 PM

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@mm-token-exchange-service mm-token-exchange-service Bot added the team-swaps-and-bridge Swaps and Bridge team label Jun 12, 2026
@socket-security

socket-security Bot commented Jun 12, 2026

Copy link
Copy Markdown

Warning

MetaMask internal reviewing guidelines:

  • Do not ignore-all
  • Each alert has instructions on how to review if you don't know what it means. If lost, ask your Security Liaison or the supply-chain group
  • Copy-paste ignore lines for specific packages or a group of one kind with a note on what research you did to deem it safe.
    @SocketSecurity ignore npm/PACKAGE@VERSION
Action Severity Alert  (click "▶" to expand/collapse)
Warn Low
Potential code anomaly (AI signal): npm @metamask/transaction-controller is 100.0% likely to have a medium risk anomaly

Notes: The code performs straightforward signature verification using ethers.js, returning true when the recovered signer matches the provided publicKey. While generally safe, the silent catch and potential mismatch between data formatting and signing process should be addressed to avoid silent failures. Overall, a benign utility with moderate input-format sensitivity.

Confidence: 1.00

Severity: 0.60

From: ?npm/@metamask/profile-metrics-controller@3.1.0npm/@metamask/transaction-controller@62.22.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@metamask/transaction-controller@62.22.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Potential code anomaly (AI signal): npm @metamask/transaction-controller is 100.0% likely to have a medium risk anomaly

Notes: The code performs straightforward signature verification using ethers.js, returning true when the recovered signer matches the provided publicKey. While generally safe, the silent catch and potential mismatch between data formatting and signing process should be addressed to avoid silent failures. Overall, a benign utility with moderate input-format sensitivity.

Confidence: 1.00

Severity: 0.60

From: ?npm/@metamask/gator-permissions-controller@4.0.0npm/@metamask/transaction-controller@64.4.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@metamask/transaction-controller@64.4.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Potential code anomaly (AI signal): npm @metamask/transaction-controller is 100.0% likely to have a medium risk anomaly

Notes: The code performs straightforward signature verification using ethers.js, returning true when the recovered signer matches the provided publicKey. While generally safe, the silent catch and potential mismatch between data formatting and signing process should be addressed to avoid silent failures. Overall, a benign utility with moderate input-format sensitivity.

Confidence: 1.00

Severity: 0.60

From: ?npm/@metamask/eip-5792-middleware@3.0.4npm/@metamask/phishing-controller@17.2.0npm/@metamask/smart-transactions-controller@24.2.0npm/@metamask/transaction-controller@65.4.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@metamask/transaction-controller@65.4.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Potential code anomaly (AI signal): npm @metamask/transaction-controller is 100.0% likely to have a medium risk anomaly

Notes: The code performs straightforward signature verification using ethers.js, returning true when the recovered signer matches the provided publicKey. While generally safe, the silent catch and potential mismatch between data formatting and signing process should be addressed to avoid silent failures. Overall, a benign utility with moderate input-format sensitivity.

Confidence: 1.00

Severity: 0.60

From: ?npm/@metamask/network-enablement-controller@5.3.0npm/@metamask/transaction-controller@66.0.1

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@metamask/transaction-controller@66.0.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Potential code anomaly (AI signal): npm @metamask/transaction-controller is 100.0% likely to have a medium risk anomaly

Notes: The code performs straightforward signature verification using ethers.js, returning true when the recovered signer matches the provided publicKey. While generally safe, the silent catch and potential mismatch between data formatting and signing process should be addressed to avoid silent failures. Overall, a benign utility with moderate input-format sensitivity.

Confidence: 1.00

Severity: 0.60

From: package.jsonnpm/@metamask/transaction-pay-controller@23.6.0npm/@metamask/transaction-controller@67.1.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@metamask/transaction-controller@67.1.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Potential code anomaly (AI signal): npm @metamask/transaction-controller is 100.0% likely to have a medium risk anomaly

Notes: The code performs straightforward signature verification using ethers.js, returning true when the recovered signer matches the provided publicKey. While generally safe, the silent catch and potential mismatch between data formatting and signing process should be addressed to avoid silent failures. Overall, a benign utility with moderate input-format sensitivity.

Confidence: 1.00

Severity: 0.60

From: ?npm/@metamask/transaction-pay-controller@23.6.0npm/@metamask/transaction-controller@68.0.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@metamask/transaction-controller@68.0.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@infiniteflower infiniteflower marked this pull request as ready for review June 12, 2026 18:46
@github-actions github-actions Bot added the risk:high AI analysis: high risk label Jun 12, 2026
@infiniteflower infiniteflower changed the title fix: batch sell submit not working fix: batch sell submit not working cp-7.82.0 Jun 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeSwap, SmokeStake, SmokeWalletPlatform, SmokeMoney, SmokePerps, SmokeMultiChainAPI, SmokePredictions, SmokeSeedlessOnboarding, SmokeBrowser, SmokeSnaps
  • Selected Performance tags: @PerformanceSwaps
  • Risk Level: high
  • AI Confidence: 100%
click to see 🤖 AI reasoning details

E2E Test Selection:
Hard rule (controller-version-update): @MetaMask controller package version updated in package.json: @metamask/transaction-controller. Running all tests.

Performance Test Selection:
The removal of the transaction-controller resolution override changes the version from 67.0.0 to 67.1.0 for the main app. Swap flows are the most performance-sensitive transaction flows and directly use TransactionController for quote execution and transaction submission. A version change in TransactionController could affect swap execution timing. Other performance tags (@PerformanceLaunch, @PerformanceLogin, @PerformanceOnboarding, @PerformanceAccountList, @PerformanceAssetLoading) are less directly impacted by TransactionController version changes.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

⚡ Performance Test Results

ℹ️ Performance test results are currently non-blocking and will not block this PR.

All tests passed · 2 tests · 1 device

📱 Devices tested (1)

Android: Google Pixel 8 Pro (v14.0)

✅ Passed Tests (2)
Test Platform Device Duration Team Recording
Swap flow - ETH to LINK, SRP 1 + SRP 2 + SRP 3 Android Google Pixel 8 Pro (v14.0) 2.16s @swap-bridge-dev-team 📹 Watch
Cross-chain swap flow - ETH to SOL - 50+ accounts, SRP 1 + SRP 2 + SRP 3 Android Google Pixel 8 Pro (v14.0) 5.11s @swap-bridge-dev-team 📹 Watch

Branch: fix/batchSell-txs-not-submitted · Build: Normal · Commit: f5fdef8 · View full run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high AI analysis: high risk size-XS team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Batch sell not submitting txs

3 participants