diff --git a/packages/transaction-controller/CHANGELOG.md b/packages/transaction-controller/CHANGELOG.md index cb0def6a62b..2c5a4cd0f80 100644 --- a/packages/transaction-controller/CHANGELOG.md +++ b/packages/transaction-controller/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add optional `submissionMethod` property and `TransactionSubmissionMethod` enum to `TransactionMeta` ([#8375](https://github.com/MetaMask/core/pull/8375)) + ### Changed - Bump `@metamask/accounts-controller` from `^37.1.1` to `^37.2.0` ([#8363](https://github.com/MetaMask/core/pull/8363)) diff --git a/packages/transaction-controller/src/index.ts b/packages/transaction-controller/src/index.ts index d0fad253777..ea1d47da0ca 100644 --- a/packages/transaction-controller/src/index.ts +++ b/packages/transaction-controller/src/index.ts @@ -123,6 +123,7 @@ export { TransactionContainerType, TransactionEnvelopeType, TransactionStatus, + TransactionSubmissionMethod, TransactionType, UserFeeLevel, WalletDevice, diff --git a/packages/transaction-controller/src/types.ts b/packages/transaction-controller/src/types.ts index 3282ce2cebb..9c2e78d6f7f 100644 --- a/packages/transaction-controller/src/types.ts +++ b/packages/transaction-controller/src/types.ts @@ -574,6 +574,11 @@ export type TransactionMeta = { error: string; message: string; }; + + /** + * The method used to submit the transaction to the network. + */ + submissionMethod?: TransactionSubmissionMethod; }; /** @@ -640,6 +645,14 @@ export type SendFlowHistoryEntry = { timestamp: number; }; +/** + * The method used to submit a transaction to the network. + */ +export enum TransactionSubmissionMethod { + SentinelStx = 'sentinel_stx', + SentinelRelay = 'sentinel_relay', +} + /** * Represents the status of a transaction within the wallet. * Each status reflects the state of the transaction internally,