@metamask/transaction-controller 56.1.0 → 56.3.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 +30 -1
- package/dist/TransactionController.cjs +14 -0
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts +4 -2
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts +4 -2
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +15 -1
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/helpers/PendingTransactionTracker.cjs +34 -3
- package/dist/helpers/PendingTransactionTracker.cjs.map +1 -1
- package/dist/helpers/PendingTransactionTracker.d.cts +12 -0
- package/dist/helpers/PendingTransactionTracker.d.cts.map +1 -1
- package/dist/helpers/PendingTransactionTracker.d.mts +12 -0
- package/dist/helpers/PendingTransactionTracker.d.mts.map +1 -1
- package/dist/helpers/PendingTransactionTracker.mjs +34 -3
- package/dist/helpers/PendingTransactionTracker.mjs.map +1 -1
- package/dist/hooks/SequentialPublishBatchHook.cjs +114 -0
- package/dist/hooks/SequentialPublishBatchHook.cjs.map +1 -0
- package/dist/hooks/SequentialPublishBatchHook.d.cts +24 -0
- package/dist/hooks/SequentialPublishBatchHook.d.cts.map +1 -0
- package/dist/hooks/SequentialPublishBatchHook.d.mts +24 -0
- package/dist/hooks/SequentialPublishBatchHook.d.mts.map +1 -0
- package/dist/hooks/SequentialPublishBatchHook.mjs +110 -0
- package/dist/hooks/SequentialPublishBatchHook.mjs.map +1 -0
- 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/types.cjs.map +1 -1
- package/dist/types.d.cts +28 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +28 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/batch.cjs +100 -9
- package/dist/utils/batch.cjs.map +1 -1
- package/dist/utils/batch.d.cts +7 -0
- package/dist/utils/batch.d.cts.map +1 -1
- package/dist/utils/batch.d.mts +7 -0
- package/dist/utils/batch.d.mts.map +1 -1
- package/dist/utils/batch.mjs +100 -9
- package/dist/utils/batch.mjs.map +1 -1
- package/dist/utils/eip7702.cjs +3 -4
- package/dist/utils/eip7702.cjs.map +1 -1
- package/dist/utils/eip7702.mjs +3 -4
- package/dist/utils/eip7702.mjs.map +1 -1
- package/dist/utils/gas-fees.cjs +3 -7
- package/dist/utils/gas-fees.cjs.map +1 -1
- package/dist/utils/gas-fees.d.cts.map +1 -1
- package/dist/utils/gas-fees.d.mts.map +1 -1
- package/dist/utils/gas-fees.mjs +3 -7
- package/dist/utils/gas-fees.mjs.map +1 -1
- package/dist/utils/prepare.cjs +45 -1
- package/dist/utils/prepare.cjs.map +1 -1
- package/dist/utils/prepare.d.cts.map +1 -1
- package/dist/utils/prepare.d.mts.map +1 -1
- package/dist/utils/prepare.mjs +46 -1
- package/dist/utils/prepare.mjs.map +1 -1
- package/dist/utils/transaction-type.cjs +4 -1
- package/dist/utils/transaction-type.cjs.map +1 -1
- package/dist/utils/transaction-type.d.cts.map +1 -1
- package/dist/utils/transaction-type.d.mts.map +1 -1
- package/dist/utils/transaction-type.mjs +4 -1
- package/dist/utils/transaction-type.mjs.map +1 -1
- package/dist/utils/validation.cjs +2 -2
- package/dist/utils/validation.cjs.map +1 -1
- package/dist/utils/validation.mjs +2 -2
- package/dist/utils/validation.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [56.3.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Include `origin` for `wallet_sendCalls` requests to the security alerts API ([#5876](https://github.com/MetaMask/core/pull/5876))
|
|
15
|
+
- Extend `ValidateSecurityRequest` with `origin` property.
|
|
16
|
+
- Send `origin` via `validateSecurity` callback.
|
|
17
|
+
- Add optional approval request when calling `addTransactionBatch` ([#5793](https://github.com/MetaMask/core/pull/5793))
|
|
18
|
+
- Add `transactionBatches` array to state.
|
|
19
|
+
- Add `TransactionBatchMeta` type.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Support leading zeroes in `authorizationList` properties ([#5830](https://github.com/MetaMask/core/pull/5830))
|
|
24
|
+
|
|
25
|
+
## [56.2.0]
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- Add sequential batch support when `publishBatchHook` is not defined ([#5762](https://github.com/MetaMask/core/pull/5762))
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Fix `userFeeLevel` as `dappSuggested` initially when dApp suggested gas values for legacy transactions ([#5821](https://github.com/MetaMask/core/pull/5821))
|
|
34
|
+
- Fix `addTransaction` function to correctly identify a transaction as a `simpleSend` type when the recipient is a smart account ([#5822](https://github.com/MetaMask/core/pull/5822))
|
|
35
|
+
- Fix gas fee randomisation with many decimal places ([#5839](https://github.com/MetaMask/core/pull/5839))
|
|
36
|
+
|
|
10
37
|
## [56.1.0]
|
|
11
38
|
|
|
12
39
|
### Added
|
|
@@ -1601,7 +1628,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1601
1628
|
|
|
1602
1629
|
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
1603
1630
|
|
|
1604
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@56.
|
|
1631
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@56.3.0...HEAD
|
|
1632
|
+
[56.3.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@56.2.0...@metamask/transaction-controller@56.3.0
|
|
1633
|
+
[56.2.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@56.1.0...@metamask/transaction-controller@56.2.0
|
|
1605
1634
|
[56.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@56.0.0...@metamask/transaction-controller@56.1.0
|
|
1606
1635
|
[56.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@55.0.2...@metamask/transaction-controller@56.0.0
|
|
1607
1636
|
[55.0.2]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@55.0.1...@metamask/transaction-controller@55.0.2
|
|
@@ -71,6 +71,10 @@ const metadata = {
|
|
|
71
71
|
persist: true,
|
|
72
72
|
anonymous: false,
|
|
73
73
|
},
|
|
74
|
+
transactionBatches: {
|
|
75
|
+
persist: true,
|
|
76
|
+
anonymous: false,
|
|
77
|
+
},
|
|
74
78
|
methodData: {
|
|
75
79
|
persist: true,
|
|
76
80
|
anonymous: false,
|
|
@@ -115,6 +119,7 @@ function getDefaultTransactionControllerState() {
|
|
|
115
119
|
return {
|
|
116
120
|
methodData: {},
|
|
117
121
|
transactions: [],
|
|
122
|
+
transactionBatches: [],
|
|
118
123
|
lastFetchedBlockNumbers: {},
|
|
119
124
|
submitHistory: [],
|
|
120
125
|
};
|
|
@@ -310,6 +315,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
310
315
|
* @returns Result object containing the generated batch ID.
|
|
311
316
|
*/
|
|
312
317
|
async addTransactionBatch(request) {
|
|
318
|
+
const { blockTracker } = this.messagingSystem.call(`NetworkController:getNetworkClientById`, request.networkClientId);
|
|
313
319
|
return await (0, batch_1.addTransactionBatch)({
|
|
314
320
|
addTransaction: this.addTransaction.bind(this),
|
|
315
321
|
getChainId: __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getChainId).bind(this),
|
|
@@ -321,6 +327,14 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
321
327
|
publicKeyEIP7702: __classPrivateFieldGet(this, _TransactionController_publicKeyEIP7702, "f"),
|
|
322
328
|
request,
|
|
323
329
|
updateTransaction: __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateTransactionInternal).bind(this),
|
|
330
|
+
publishTransaction: (ethQuery, transactionMeta) => __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_publishTransaction).call(this, ethQuery, transactionMeta),
|
|
331
|
+
getPendingTransactionTracker: (networkClientId) => __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_createPendingTransactionTracker).call(this, {
|
|
332
|
+
provider: __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getProvider).call(this, { networkClientId }),
|
|
333
|
+
blockTracker,
|
|
334
|
+
chainId: __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getChainId).call(this, networkClientId),
|
|
335
|
+
networkClientId,
|
|
336
|
+
}),
|
|
337
|
+
update: this.update.bind(this),
|
|
324
338
|
});
|
|
325
339
|
}
|
|
326
340
|
/**
|