diff --git a/packages/transaction-controller/src/TransactionController.ts b/packages/transaction-controller/src/TransactionController.ts index b6deb4d17d6..99d59f21a57 100644 --- a/packages/transaction-controller/src/TransactionController.ts +++ b/packages/transaction-controller/src/TransactionController.ts @@ -343,14 +343,20 @@ export class TransactionController extends BaseController< * if not provided. If A `:unapproved` hub event will be emitted once added. * * @param transaction - The transaction object to add. - * @param origin - The domain origin to append to the generated TransactionMeta. - * @param deviceConfirmedOn - An enum to indicate what device the transaction was confirmed to append to the generated TransactionMeta. + * @param opts - Additional options to control how the transaction is added. + * @param opts.deviceConfirmedOn - An enum to indicate what device confirmed the transaction. + * @param opts.origin - The origin of the transaction request, such as a dApp hostname. * @returns Object containing a promise resolving to the transaction hash if approved. */ async addTransaction( transaction: Transaction, - origin?: string, - deviceConfirmedOn?: WalletDevice, + { + deviceConfirmedOn, + origin, + }: { + deviceConfirmedOn?: WalletDevice; + origin?: string; + } = {}, ): Promise { const { providerConfig, network } = this.getNetworkState(); const { transactions } = this.state;