Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions packages/transaction-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Use the `transactionHistoryLimit` feature flag in `RemoteFeatureFlagController` instead.
- This option will be removed in a future version.

### Fixed

- Set `isExternalSign` for sponsored transactions to skip nonce assignment ([#7659](https://github.com/MetaMask/core/pull/7659))

## [62.9.2]

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,8 @@ export class TransactionController extends BaseController<
const existingTransactionMeta = this.#getTransactionWithActionId(actionId);

// If a request to add a transaction with the same actionId is submitted again, a new transaction will not be created for it.
// EIP-7702 batch transactions (with nestedTransactions) are signed externally via delegation
const isEIP7702Batch = Boolean(nestedTransactions?.length);
let addedTransactionMeta: TransactionMeta = existingTransactionMeta
? cloneDeep(existingTransactionMeta)
: {
Expand All @@ -1363,6 +1365,7 @@ export class TransactionController extends BaseController<
deviceConfirmedOn,
disableGasBuffer,
id: random(),
isExternalSign: isEIP7702Batch,
Copy link

Choose a reason for hiding this comment

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

EIP-7702 batch isExternalSign override by gas fee token check

Medium Severity

The new isExternalSign = isEIP7702Batch can be overridden by checkGasFeeTokenBeforePublish when a transaction has both nestedTransactions and a gasFeeToken, and the user has sufficient native balance. The checkGasFeeTokenBeforePublish function unconditionally sets isExternalSign = false in this case, which would cause the original nonce conflicts for EIP-7702 batch transactions that the PR aims to fix.

Fix in Cursor Fix in Web

isGasFeeTokenIgnoredIfBalance: Boolean(gasFeeToken),
isGasFeeIncluded,
isGasFeeSponsored,
Expand Down Expand Up @@ -1457,6 +1460,8 @@ export class TransactionController extends BaseController<

this.#addMetadata(addedTransactionMeta);

// Record delegationAddress for metrics, but do not use it to determine isExternalSign.
// Only EIP-7702 batch transactions (with nestedTransactions) should have isExternalSign = true.
delegationAddressPromise
.then((delegationAddress) => {
this.#updateTransactionInternal(
Expand Down