Skip to content

feat: tempo transactions poc utils approach#27142

Open
maxime-oe wants to merge 1 commit intomainfrom
feat/poc-tempo-transactions-utils
Open

feat: tempo transactions poc utils approach#27142
maxime-oe wants to merge 1 commit intomainfrom
feat/poc-tempo-transactions-utils

Conversation

@maxime-oe
Copy link
Copy Markdown
Contributor

@maxime-oe maxime-oe commented Mar 6, 2026

Description

Meant to be used along with MetaMask/core#8052
Mobile twin of MetaMask/metamask-extension#40449

Changelog

CHANGELOG entry: adds Tempo transactions (partial) support on Mobile.

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

Note

High Risk
High risk because it changes transaction submission paths (addTransaction, wallet_sendCalls) and fee-token selection/alerts using new excludeNativeTokenForFee behavior, which could affect signing, batching, and gas fee UX on supported chains.

Overview
Adds Tempo chain (no native token) support by introducing tempo-tx-utils and routing Tempo transactions through a new addTempoTransaction path: non-Tempo-style txs get default fee-token options, while Tempo type: 0x76 requests are validated and converted into addTransactionBatch calls.

Updates confirmations gas-fee UI and hooks to respect excludeNativeTokenForFee: hides the native token option in the modal, disables the selector when there’s only one non-native choice, falls back to chain-configured fee token symbol/address when no native exists, and adjusts insufficient-balance messaging to display the configured symbol.

Extends BackgroundBridge EIP-5792 wallet_sendCalls handling to inject Tempo extra options when the account supports EIP-7702, adds Tempo chain IDs/symbol mapping, and bumps related controller dependencies; includes new/updated unit tests around Tempo utils and selection behavior.

Written by Cursor Bugbot for commit 5f80de6. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 6, 2026

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.

@metamaskbot metamaskbot added the team-networks Networks team label Mar 6, 2026
@github-actions github-actions bot added the size-M label Mar 6, 2026
@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch 6 times, most recently from f8e7b30 to aecc753 Compare March 11, 2026 13:51
@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 11, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​assets-controller@​3.2.1 ⏵ 3.3.070 +110080 +197 +1100
Updatednpm/​@​metamask/​assets-controllers@​103.0.0 ⏵ 103.1.172 +110091 +199 +1100
Updatednpm/​@​metamask/​controller-utils@​11.19.0 ⏵ 11.20.09710077 +195 +5100
Updatednpm/​@​metamask/​delegation-deployments@​0.15.0 ⏵ 1.0.010010081 +395 +2100

View full report

@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from aecc753 to fa39370 Compare March 11, 2026 14:24
@maxime-oe maxime-oe marked this pull request as ready for review March 11, 2026 15:31
@maxime-oe maxime-oe requested a review from a team as a code owner March 11, 2026 15:31
@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from fa39370 to 8eaea2f Compare March 12, 2026 16:48
@github-actions github-actions bot added size-L and removed size-M labels Mar 12, 2026
@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from 8eaea2f to 9dc0a54 Compare March 17, 2026 08:26
@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from 9dc0a54 to c9db7bd Compare March 17, 2026 08:55
@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from c9db7bd to a3874f5 Compare March 18, 2026 17:25
@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from a3874f5 to a8dded9 Compare March 18, 2026 17:44
@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from a8dded9 to 570461d Compare March 23, 2026 18:02
@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from 570461d to 053336a Compare March 30, 2026 14:55
@maxime-oe maxime-oe requested a review from a team as a code owner March 30, 2026 14:55
@github-actions github-actions bot added the risk-high Extensive testing required · High bug introduction risk label Mar 30, 2026
@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from 053336a to 5da7f69 Compare March 30, 2026 15:06
@github-actions github-actions bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
18 value mismatches detected (expected — fixture represents an existing user).
View details

@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from 5da7f69 to fd2c804 Compare April 1, 2026 15:39
@github-actions github-actions bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Apr 1, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
70.7% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch 2 times, most recently from b353c08 to 5f80de6 Compare April 1, 2026 16:10
@github-actions github-actions bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeCard, SmokePerps, SmokeRamps, SmokeMultiChainAPI, SmokePredictions, FlaskBuildTests
  • Selected Performance tags: @PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps
  • 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/assets-controller, @metamask/assets-controllers, @metamask/transaction-controller. Running all tests.

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

View GitHub Actions results

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

return {};
}
return getTempoExtraOptionsForChain(chainId);
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Tempo chain guard causes spurious warnings on all chains

Medium Severity

getChainExtraParamsForWalletSendCalls calls accountSupports7702 for every wallet_sendCalls on any chain and logs a misleading "Tempo chain but wallet does not support 7702" warning when the account doesn't support 7702, even on Ethereum mainnet. The equivalent logic in index.ts correctly gates on isTempoChain(chainId) before performing the 7702 check. This function is missing the same guard, causing unnecessary async overhead and noisy/misleading warnings for all non-7702 accounts on every chain.

Fix in Cursor Fix in Web

@maxime-oe maxime-oe force-pushed the feat/poc-tempo-transactions-utils branch from 5f80de6 to fe8472e Compare April 1, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-high Extensive testing required · High bug introduction risk size-L team-networks Networks team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants