diff --git a/packages/transaction-controller/CHANGELOG.md b/packages/transaction-controller/CHANGELOG.md index c9596acab9e..e114df9c5c6 100644 --- a/packages/transaction-controller/CHANGELOG.md +++ b/packages/transaction-controller/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Set `isExternalSign` for sponsored transactions to skip nonce assignment ([#7659](https://github.com/MetaMask/core/pull/7659)) - Ensure provided `batchId` is used in `addTransactionBatch` when going through the publish batch hook route ([#7705](https://github.com/MetaMask/core/pull/7705)) ## [62.9.2] diff --git a/packages/transaction-controller/src/TransactionController.ts b/packages/transaction-controller/src/TransactionController.ts index 2f5f942d70e..d2a4b4b1694 100644 --- a/packages/transaction-controller/src/TransactionController.ts +++ b/packages/transaction-controller/src/TransactionController.ts @@ -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) : { @@ -1363,6 +1365,7 @@ export class TransactionController extends BaseController< deviceConfirmedOn, disableGasBuffer, id: random(), + isExternalSign: isEIP7702Batch, isGasFeeTokenIgnoredIfBalance: Boolean(gasFeeToken), isGasFeeIncluded, isGasFeeSponsored, @@ -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(