@metamask/transaction-controller 60.5.0 → 60.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/dist/TransactionController.cjs +4 -21
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts +15 -46
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts +15 -46
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +4 -21
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs +4 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +49 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +49 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +4 -0
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [60.6.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Expose `addTransaction` and `addTransactionBatch` methods through the messenger ([#6749](https://github.com/MetaMask/core/pull/6749))
|
|
15
|
+
- Add types:
|
|
16
|
+
- `AddTransactionOptions`
|
|
17
|
+
- `TransactionControllerAddTransactionAction`
|
|
18
|
+
- `TransactionControllerAddTransactionBatchAction`
|
|
19
|
+
- Add new `shieldSubscriptionApprove` transaction type for shield subscription confirmation ([#6769](https://github.com/MetaMask/core/pull/6769))
|
|
20
|
+
|
|
10
21
|
## [60.5.0]
|
|
11
22
|
|
|
12
23
|
### Added
|
|
@@ -1832,7 +1843,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1832
1843
|
|
|
1833
1844
|
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
1834
1845
|
|
|
1835
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.
|
|
1846
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.6.0...HEAD
|
|
1847
|
+
[60.6.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.5.0...@metamask/transaction-controller@60.6.0
|
|
1836
1848
|
[60.5.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.4.0...@metamask/transaction-controller@60.5.0
|
|
1837
1849
|
[60.4.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.3.0...@metamask/transaction-controller@60.4.0
|
|
1838
1850
|
[60.3.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.2.0...@metamask/transaction-controller@60.3.0
|
|
@@ -368,30 +368,11 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
368
368
|
}
|
|
369
369
|
/**
|
|
370
370
|
* Add a new unapproved transaction to state. Parameters will be validated, a
|
|
371
|
-
* unique transaction
|
|
372
|
-
* if not provided.
|
|
371
|
+
* unique transaction ID will be generated, and `gas` and `gasPrice` will be calculated
|
|
372
|
+
* if not provided. A `<tx.id>:unapproved` hub event will be emitted once added.
|
|
373
373
|
*
|
|
374
374
|
* @param txParams - Standard parameters for an Ethereum transaction.
|
|
375
375
|
* @param options - Additional options to control how the transaction is added.
|
|
376
|
-
* @param options.actionId - Unique ID to prevent duplicate requests.
|
|
377
|
-
* @param options.assetsFiatValues - The fiat values of the assets being sent and received.
|
|
378
|
-
* @param options.batchId - A custom ID for the batch this transaction belongs to.
|
|
379
|
-
* @param options.deviceConfirmedOn - An enum to indicate what device confirmed the transaction.
|
|
380
|
-
* @param options.disableGasBuffer - Whether to disable the gas estimation buffer.
|
|
381
|
-
* @param options.isGasFeeIncluded - Whether MetaMask will be compensated for the gas fee by the transaction.
|
|
382
|
-
* @param options.method - RPC method that requested the transaction.
|
|
383
|
-
* @param options.nestedTransactions - Params for any nested transactions encoded in the data.
|
|
384
|
-
* @param options.origin - The origin of the transaction request, such as a dApp hostname.
|
|
385
|
-
* @param options.publishHook - Custom logic to publish the transaction.
|
|
386
|
-
* @param options.requireApproval - Whether the transaction requires approval by the user, defaults to true unless explicitly disabled.
|
|
387
|
-
* @param options.securityAlertResponse - Response from security validator.
|
|
388
|
-
* @param options.sendFlowHistory - The sendFlowHistory entries to add.
|
|
389
|
-
* @param options.type - Type of transaction to add, such as 'cancel' or 'swap'.
|
|
390
|
-
* @param options.swaps - Options for swaps transactions.
|
|
391
|
-
* @param options.swaps.hasApproveTx - Whether the transaction has an approval transaction.
|
|
392
|
-
* @param options.swaps.meta - Metadata for swap transaction.
|
|
393
|
-
* @param options.networkClientId - The id of the network client for this transaction.
|
|
394
|
-
* @param options.traceContext - The parent context for any new traces.
|
|
395
376
|
* @returns Object containing a promise resolving to the transaction hash if approved.
|
|
396
377
|
*/
|
|
397
378
|
async addTransaction(txParams, options) {
|
|
@@ -2222,6 +2203,8 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
|
|
|
2222
2203
|
txMeta: transactionMeta,
|
|
2223
2204
|
});
|
|
2224
2205
|
}, _TransactionController_registerActionHandlers = function _TransactionController_registerActionHandlers() {
|
|
2206
|
+
this.messagingSystem.registerActionHandler(`${controllerName}:addTransaction`, this.addTransaction.bind(this));
|
|
2207
|
+
this.messagingSystem.registerActionHandler(`${controllerName}:addTransactionBatch`, this.addTransactionBatch.bind(this));
|
|
2225
2208
|
this.messagingSystem.registerActionHandler(`${controllerName}:confirmExternalTransaction`, this.confirmExternalTransaction.bind(this));
|
|
2226
2209
|
this.messagingSystem.registerActionHandler(`${controllerName}:estimateGas`, this.estimateGas.bind(this));
|
|
2227
2210
|
this.messagingSystem.registerActionHandler(`${controllerName}:getNonceLock`, this.getNonceLock.bind(this));
|