diff --git a/packages/transaction-controller/CHANGELOG.md b/packages/transaction-controller/CHANGELOG.md index a3979be382f..a51036eb8c5 100644 --- a/packages/transaction-controller/CHANGELOG.md +++ b/packages/transaction-controller/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^3.1.0` ([#7519](https://github.com/MetaMask/core/pull/7519)) - Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` ([#7534](https://github.com/MetaMask/core/pull/7534)) - Bump `@metamask/controller-utils` from `^11.16.0` to `^11.17.0` ([#7534](https://github.com/MetaMask/core/pull/7534)) +- Update error message for failed on-chain transactions in `PendingTransactionTracker` ([#7552](https://github.com/MetaMask/core/pull/7552)) ### Fixed diff --git a/packages/transaction-controller/src/helpers/PendingTransactionTracker.test.ts b/packages/transaction-controller/src/helpers/PendingTransactionTracker.test.ts index 883a8583f67..74630faeead 100644 --- a/packages/transaction-controller/src/helpers/PendingTransactionTracker.test.ts +++ b/packages/transaction-controller/src/helpers/PendingTransactionTracker.test.ts @@ -478,7 +478,7 @@ describe('PendingTransactionTracker', () => { expect(listener).toHaveBeenCalledTimes(1); expect(listener).toHaveBeenCalledWith( TRANSACTION_SUBMITTED_MOCK, - new Error('Transaction dropped or replaced'), + new Error('Transaction failed on-chain'), ); }); }); @@ -1255,7 +1255,7 @@ describe('PendingTransactionTracker', () => { expect(listener).toHaveBeenCalledTimes(1); expect(listener).toHaveBeenCalledWith( transactionMeta, - new Error('Transaction dropped or replaced'), + new Error('Transaction failed on-chain'), ); }); diff --git a/packages/transaction-controller/src/helpers/PendingTransactionTracker.ts b/packages/transaction-controller/src/helpers/PendingTransactionTracker.ts index fb1673eaeea..929ea11e1ea 100644 --- a/packages/transaction-controller/src/helpers/PendingTransactionTracker.ts +++ b/packages/transaction-controller/src/helpers/PendingTransactionTracker.ts @@ -445,10 +445,7 @@ export class PendingTransactionTracker { if (isFailure) { this.#log('Transaction receipt has failed status'); - this.#failTransaction( - txMeta, - new Error('Transaction dropped or replaced'), - ); + this.#failTransaction(txMeta, new Error('Transaction failed on-chain')); return; }