@metamask/transaction-controller 60.2.0 → 60.4.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 +32 -1
- package/dist/TransactionController.cjs +15 -0
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts +39 -1
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts +39 -1
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +15 -0
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/hooks/CollectPublishHook.cjs +26 -16
- package/dist/hooks/CollectPublishHook.cjs.map +1 -1
- package/dist/hooks/CollectPublishHook.d.cts.map +1 -1
- package/dist/hooks/CollectPublishHook.d.mts.map +1 -1
- package/dist/hooks/CollectPublishHook.mjs +27 -16
- package/dist/hooks/CollectPublishHook.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/utils/batch.cjs +35 -7
- package/dist/utils/batch.cjs.map +1 -1
- package/dist/utils/batch.d.cts +1 -0
- package/dist/utils/batch.d.cts.map +1 -1
- package/dist/utils/batch.d.mts +1 -0
- package/dist/utils/batch.d.mts.map +1 -1
- package/dist/utils/batch.mjs +36 -8
- package/dist/utils/batch.mjs.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [60.4.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Expose `confirmExternalTransaction`, `getNonceLock`, `getTransactions`, and `updateTransaction` actions through the messenger ([#6615](https://github.com/MetaMask/core/pull/6615))
|
|
15
|
+
- Like other action methods, they are callable as `TransactionController:*`
|
|
16
|
+
- Also add associated types:
|
|
17
|
+
- `TransactionControllerConfirmExternalTransactionAction`
|
|
18
|
+
- `TransactionControllerGetNonceLockAction`
|
|
19
|
+
- `TransactionControllerGetTransactionsAction`
|
|
20
|
+
- `TransactionControllerUpdateTransactionAction`
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Bump `@metamask/controller-utils` from `^11.12.0` to `^11.14.0` ([#6620](https://github.com/MetaMask/core/pull/6620), [#6629](https://github.com/MetaMask/core/pull/6629))
|
|
25
|
+
- Bump `@metamask/utils` from `^11.4.2` to `^11.8.0` ([#6588](https://github.com/MetaMask/core/pull/6588))
|
|
26
|
+
- Bump `@metamask/base-controller` from `^8.3.0` to `^8.4.0` ([#6632](https://github.com/MetaMask/core/pull/6632))
|
|
27
|
+
|
|
28
|
+
## [60.3.0]
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Add two new controller state metadata properties: `includeInStateLogs` and `usedInUi` ([#6473](https://github.com/MetaMask/core/pull/6473))
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Update nonce of existing transaction if converted to batch via `batchTransactions` but not first transaction ([#6528](https://github.com/MetaMask/core/pull/6528))
|
|
37
|
+
- Bump `@metamask/base-controller` from `^8.2.0` to `^8.3.0` ([#6465](https://github.com/MetaMask/core/pull/6465))
|
|
38
|
+
|
|
10
39
|
## [60.2.0]
|
|
11
40
|
|
|
12
41
|
### Added
|
|
@@ -1789,7 +1818,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1789
1818
|
|
|
1790
1819
|
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
1791
1820
|
|
|
1792
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.
|
|
1821
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.4.0...HEAD
|
|
1822
|
+
[60.4.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.3.0...@metamask/transaction-controller@60.4.0
|
|
1823
|
+
[60.3.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.2.0...@metamask/transaction-controller@60.3.0
|
|
1793
1824
|
[60.2.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.1.0...@metamask/transaction-controller@60.2.0
|
|
1794
1825
|
[60.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.0.0...@metamask/transaction-controller@60.1.0
|
|
1795
1826
|
[60.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@59.2.0...@metamask/transaction-controller@60.0.0
|
|
@@ -68,24 +68,34 @@ const validation_1 = require("./utils/validation.cjs");
|
|
|
68
68
|
*/
|
|
69
69
|
const metadata = {
|
|
70
70
|
transactions: {
|
|
71
|
+
includeInStateLogs: true,
|
|
71
72
|
persist: true,
|
|
72
73
|
anonymous: false,
|
|
74
|
+
usedInUi: true,
|
|
73
75
|
},
|
|
74
76
|
transactionBatches: {
|
|
77
|
+
includeInStateLogs: true,
|
|
75
78
|
persist: true,
|
|
76
79
|
anonymous: false,
|
|
80
|
+
usedInUi: true,
|
|
77
81
|
},
|
|
78
82
|
methodData: {
|
|
83
|
+
includeInStateLogs: true,
|
|
79
84
|
persist: true,
|
|
80
85
|
anonymous: false,
|
|
86
|
+
usedInUi: true,
|
|
81
87
|
},
|
|
82
88
|
lastFetchedBlockNumbers: {
|
|
89
|
+
includeInStateLogs: true,
|
|
83
90
|
persist: true,
|
|
84
91
|
anonymous: false,
|
|
92
|
+
usedInUi: false,
|
|
85
93
|
},
|
|
86
94
|
submitHistory: {
|
|
95
|
+
includeInStateLogs: true,
|
|
87
96
|
persist: true,
|
|
88
97
|
anonymous: false,
|
|
98
|
+
usedInUi: false,
|
|
89
99
|
},
|
|
90
100
|
};
|
|
91
101
|
const SUBMIT_HISTORY_LIMIT = 100;
|
|
@@ -337,6 +347,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
337
347
|
publicKeyEIP7702: __classPrivateFieldGet(this, _TransactionController_publicKeyEIP7702, "f"),
|
|
338
348
|
publishTransaction: (ethQuery, transactionMeta) => __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_publishTransaction).call(this, ethQuery, transactionMeta),
|
|
339
349
|
request,
|
|
350
|
+
signTransaction: __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_signTransaction).bind(this),
|
|
340
351
|
update: this.update.bind(this),
|
|
341
352
|
updateTransaction: __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateTransactionInternal).bind(this),
|
|
342
353
|
});
|
|
@@ -2247,8 +2258,12 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
|
|
|
2247
2258
|
txMeta: transactionMeta,
|
|
2248
2259
|
});
|
|
2249
2260
|
}, _TransactionController_registerActionHandlers = function _TransactionController_registerActionHandlers() {
|
|
2261
|
+
this.messagingSystem.registerActionHandler(`${controllerName}:confirmExternalTransaction`, this.confirmExternalTransaction.bind(this));
|
|
2250
2262
|
this.messagingSystem.registerActionHandler(`${controllerName}:estimateGas`, this.estimateGas.bind(this));
|
|
2263
|
+
this.messagingSystem.registerActionHandler(`${controllerName}:getNonceLock`, this.getNonceLock.bind(this));
|
|
2264
|
+
this.messagingSystem.registerActionHandler(`${controllerName}:getTransactions`, this.getTransactions.bind(this));
|
|
2251
2265
|
this.messagingSystem.registerActionHandler(`${controllerName}:updateCustodialTransaction`, this.updateCustodialTransaction.bind(this));
|
|
2266
|
+
this.messagingSystem.registerActionHandler(`${controllerName}:updateTransaction`, this.updateTransaction.bind(this));
|
|
2252
2267
|
}, _TransactionController_deleteTransaction = function _TransactionController_deleteTransaction(transactionId) {
|
|
2253
2268
|
this.update((state) => {
|
|
2254
2269
|
const transactions = state.transactions.filter(({ id }) => id !== transactionId);
|