@metamask-previews/transaction-controller 24.0.0-preview.eb2135e → 25.1.0-preview-d4ae797
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 +129 -1
- package/dist/TransactionController.js +19 -17
- package/dist/TransactionController.mjs +18 -16
- package/dist/{chunk-7MZ57ILQ.mjs → chunk-2YXA3K67.mjs} +2 -2
- package/dist/{chunk-EQ3RRHB7.mjs → chunk-3D3SA6PY.mjs} +2 -2
- package/dist/{chunk-FDJPXQTF.js → chunk-4S25HUCL.js} +12 -12
- package/dist/{chunk-IC233ZQS.js → chunk-5OQ373JS.js} +10 -10
- package/dist/{chunk-DEKM6PVG.mjs → chunk-7XPI7KU5.mjs} +2 -2
- package/dist/{chunk-DE3MZYVY.mjs → chunk-B7ODKZQR.mjs} +49 -27
- package/dist/chunk-B7ODKZQR.mjs.map +1 -0
- package/dist/{chunk-NUOBUW7C.js → chunk-CXXGL43K.js} +3 -3
- package/dist/{chunk-DQP6X25N.mjs → chunk-DTONMSFW.mjs} +3 -3
- package/dist/{chunk-GKTIFXPN.js → chunk-F3CMU2DM.js} +6 -6
- package/dist/{chunk-ZJLZSFOZ.js → chunk-FPLIHYSA.js} +8 -8
- package/dist/{chunk-UM4ORJ5B.mjs → chunk-HXE4JCEK.mjs} +5 -5
- package/dist/{chunk-FS7FRO7B.mjs → chunk-ILCQ262Y.mjs} +5 -5
- package/dist/{chunk-RI6MVJJN.js → chunk-ITDY6AIZ.js} +6 -1
- package/dist/chunk-ITDY6AIZ.js.map +1 -0
- package/dist/{chunk-2K7J3EY3.mjs → chunk-IZI7FQIN.mjs} +3 -3
- package/dist/{chunk-BJEESIBE.js → chunk-KQTMDKO5.js} +59 -37
- package/dist/chunk-KQTMDKO5.js.map +1 -0
- package/dist/chunk-KZBDAX2Z.js +69 -0
- package/dist/chunk-KZBDAX2Z.js.map +1 -0
- package/dist/{chunk-LM4NUNMT.mjs → chunk-NM4LTWRU.mjs} +1 -1
- package/dist/chunk-NM4LTWRU.mjs.map +1 -0
- package/dist/{chunk-M7455RU7.js → chunk-NRWEI43Q.js} +3 -3
- package/dist/{chunk-H4M66BA3.js → chunk-O7H2MC7R.js} +4 -4
- package/dist/{chunk-I5YZ7QUK.js → chunk-P57CVQWK.js} +7 -7
- package/dist/{chunk-ZCQRDZ36.js → chunk-QPNEFZB3.js} +5 -5
- package/dist/{chunk-JR6HDRNV.mjs → chunk-QSBIXUMB.mjs} +2 -2
- package/dist/{chunk-IUBAETUH.js → chunk-RQKICZYP.js} +3 -3
- package/dist/{chunk-6MYNWYJK.mjs → chunk-S2OXIMIM.mjs} +34 -10
- package/dist/chunk-S2OXIMIM.mjs.map +1 -0
- package/dist/chunk-SJHACWAJ.js +73 -0
- package/dist/chunk-SJHACWAJ.js.map +1 -0
- package/dist/chunk-UXGKS6VI.mjs +73 -0
- package/dist/chunk-UXGKS6VI.mjs.map +1 -0
- package/dist/{chunk-Y734U4V6.mjs → chunk-VEREDMI2.mjs} +2 -2
- package/dist/{chunk-HPNXIKFY.js → chunk-W3GAOR7Y.js} +1 -1
- package/dist/chunk-W3GAOR7Y.js.map +1 -0
- package/dist/chunk-WERIBZRG.mjs +69 -0
- package/dist/chunk-WERIBZRG.mjs.map +1 -0
- package/dist/{chunk-DTEDYRTL.js → chunk-WXQZIUNW.js} +4 -4
- package/dist/{chunk-UKYY2RVS.mjs → chunk-XKNFL657.mjs} +2 -2
- package/dist/{chunk-7APMBUKB.js → chunk-XOLEIJ4W.js} +35 -11
- package/dist/chunk-XOLEIJ4W.js.map +1 -0
- package/dist/{chunk-MHM5LRRF.mjs → chunk-Z3HHSD5I.mjs} +6 -1
- package/dist/chunk-Z3HHSD5I.mjs.map +1 -0
- package/dist/{chunk-C67QD5PV.mjs → chunk-ZQFMTLZJ.mjs} +2 -2
- package/dist/constants.js +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/gas-flows/DefaultGasFeeFlow.js +7 -7
- package/dist/gas-flows/DefaultGasFeeFlow.mjs +6 -6
- package/dist/gas-flows/LineaGasFeeFlow.js +8 -8
- package/dist/gas-flows/LineaGasFeeFlow.mjs +7 -7
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.js +11 -0
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.js.map +1 -0
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.mjs +11 -0
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.mjs.map +1 -0
- package/dist/helpers/EtherscanRemoteTransactionSource.js +5 -5
- package/dist/helpers/EtherscanRemoteTransactionSource.mjs +4 -4
- package/dist/helpers/GasFeePoller.js +5 -4
- package/dist/helpers/GasFeePoller.mjs +4 -3
- package/dist/helpers/MultichainTrackingHelper.js +6 -6
- package/dist/helpers/MultichainTrackingHelper.mjs +5 -5
- package/dist/helpers/PendingTransactionTracker.js +1 -1
- package/dist/helpers/PendingTransactionTracker.mjs +1 -1
- package/dist/index.js +22 -20
- package/dist/index.mjs +21 -19
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/TransactionController.d.ts +1 -0
- package/dist/types/TransactionController.d.ts.map +1 -1
- package/dist/types/constants.d.ts +5 -0
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/gas-flows/OptimismLayer1GasFeeFlow.d.ts +10 -0
- package/dist/types/gas-flows/OptimismLayer1GasFeeFlow.d.ts.map +1 -0
- package/dist/types/helpers/GasFeePoller.d.ts +5 -3
- package/dist/types/helpers/GasFeePoller.d.ts.map +1 -1
- package/dist/types/types.d.ts +31 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/layer1-gas-fee-flow.d.ts +23 -0
- package/dist/types/utils/layer1-gas-fee-flow.d.ts.map +1 -0
- package/dist/types.js +2 -2
- package/dist/types.mjs +1 -1
- package/dist/utils/etherscan.js +3 -3
- package/dist/utils/etherscan.mjs +2 -2
- package/dist/utils/external-transactions.js +1 -1
- package/dist/utils/external-transactions.mjs +1 -1
- package/dist/utils/gas-fees.js +6 -6
- package/dist/utils/gas-fees.mjs +5 -5
- package/dist/utils/gas-flow.js +3 -3
- package/dist/utils/gas-flow.mjs +2 -2
- package/dist/utils/gas.js +3 -3
- package/dist/utils/gas.mjs +2 -2
- package/dist/utils/layer1-gas-fee-flow.js +11 -0
- package/dist/utils/layer1-gas-fee-flow.js.map +1 -0
- package/dist/utils/layer1-gas-fee-flow.mjs +11 -0
- package/dist/utils/layer1-gas-fee-flow.mjs.map +1 -0
- package/dist/utils/simulation-api.js +3 -3
- package/dist/utils/simulation-api.mjs +2 -2
- package/dist/utils/simulation.js +5 -5
- package/dist/utils/simulation.mjs +4 -4
- package/dist/utils/swaps.js +4 -4
- package/dist/utils/swaps.mjs +3 -3
- package/dist/utils/transaction-type.js +1 -1
- package/dist/utils/transaction-type.mjs +1 -1
- package/dist/utils/utils.js +1 -1
- package/dist/utils/utils.mjs +1 -1
- package/dist/utils/validation.js +1 -1
- package/dist/utils/validation.mjs +1 -1
- package/package.json +11 -10
- package/dist/chunk-6MYNWYJK.mjs.map +0 -1
- package/dist/chunk-7APMBUKB.js.map +0 -1
- package/dist/chunk-BJEESIBE.js.map +0 -1
- package/dist/chunk-DE3MZYVY.mjs.map +0 -1
- package/dist/chunk-HPNXIKFY.js.map +0 -1
- package/dist/chunk-LM4NUNMT.mjs.map +0 -1
- package/dist/chunk-MHM5LRRF.mjs.map +0 -1
- package/dist/chunk-RI6MVJJN.js.map +0 -1
- /package/dist/{chunk-7MZ57ILQ.mjs.map → chunk-2YXA3K67.mjs.map} +0 -0
- /package/dist/{chunk-EQ3RRHB7.mjs.map → chunk-3D3SA6PY.mjs.map} +0 -0
- /package/dist/{chunk-FDJPXQTF.js.map → chunk-4S25HUCL.js.map} +0 -0
- /package/dist/{chunk-IC233ZQS.js.map → chunk-5OQ373JS.js.map} +0 -0
- /package/dist/{chunk-DEKM6PVG.mjs.map → chunk-7XPI7KU5.mjs.map} +0 -0
- /package/dist/{chunk-NUOBUW7C.js.map → chunk-CXXGL43K.js.map} +0 -0
- /package/dist/{chunk-DQP6X25N.mjs.map → chunk-DTONMSFW.mjs.map} +0 -0
- /package/dist/{chunk-GKTIFXPN.js.map → chunk-F3CMU2DM.js.map} +0 -0
- /package/dist/{chunk-ZJLZSFOZ.js.map → chunk-FPLIHYSA.js.map} +0 -0
- /package/dist/{chunk-UM4ORJ5B.mjs.map → chunk-HXE4JCEK.mjs.map} +0 -0
- /package/dist/{chunk-FS7FRO7B.mjs.map → chunk-ILCQ262Y.mjs.map} +0 -0
- /package/dist/{chunk-2K7J3EY3.mjs.map → chunk-IZI7FQIN.mjs.map} +0 -0
- /package/dist/{chunk-M7455RU7.js.map → chunk-NRWEI43Q.js.map} +0 -0
- /package/dist/{chunk-H4M66BA3.js.map → chunk-O7H2MC7R.js.map} +0 -0
- /package/dist/{chunk-I5YZ7QUK.js.map → chunk-P57CVQWK.js.map} +0 -0
- /package/dist/{chunk-ZCQRDZ36.js.map → chunk-QPNEFZB3.js.map} +0 -0
- /package/dist/{chunk-JR6HDRNV.mjs.map → chunk-QSBIXUMB.mjs.map} +0 -0
- /package/dist/{chunk-IUBAETUH.js.map → chunk-RQKICZYP.js.map} +0 -0
- /package/dist/{chunk-Y734U4V6.mjs.map → chunk-VEREDMI2.mjs.map} +0 -0
- /package/dist/{chunk-DTEDYRTL.js.map → chunk-WXQZIUNW.js.map} +0 -0
- /package/dist/{chunk-UKYY2RVS.mjs.map → chunk-XKNFL657.mjs.map} +0 -0
- /package/dist/{chunk-C67QD5PV.mjs.map → chunk-ZQFMTLZJ.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,132 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [25.1.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Support `Layer1GasFeeFlows` and add `layer1GasFee` property to `TransactionMeta` ([#3944](https://github.com/MetaMask/core/pull/3944))
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Fix `types` field in `package.json` ([#4047](https://github.com/MetaMask/core/pull/4047))
|
|
19
|
+
|
|
20
|
+
## [25.0.0]
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **BREAKING**: Add ESM build ([#3998](https://github.com/MetaMask/core/pull/3998))
|
|
25
|
+
- It's no longer possible to import files from `./dist` directly.
|
|
26
|
+
- Add new types for TransactionController messenger actions ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
27
|
+
- `TransactionControllerActions`
|
|
28
|
+
- `TransactionControllerGetStateAction`
|
|
29
|
+
- Add new types for TransactionController messenger events ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
30
|
+
- `TransactionControllerEvents`
|
|
31
|
+
- `TransactionControllerIncomingTransactionBlockReceivedEvent`
|
|
32
|
+
- `TransactionControllerPostTransactionBalanceUpdatedEvent`
|
|
33
|
+
- `TransactionControllerSpeedupTransactionAddedEvent`
|
|
34
|
+
- `TransactionControllerStateChangeEvent`
|
|
35
|
+
- `TransactionControllerTransactionApprovedEvent`
|
|
36
|
+
- `TransactionControllerTransactionConfirmedEvent`
|
|
37
|
+
- `TransactionControllerTransactionDroppedEvent`
|
|
38
|
+
- `TransactionControllerTransactionFailedEvent`
|
|
39
|
+
- `TransactionControllerTransactionFinishedEvent`
|
|
40
|
+
- `TransactionControllerTransactionNewSwapApprovalEvent`
|
|
41
|
+
- `TransactionControllerTransactionNewSwapEvent`
|
|
42
|
+
- `TransactionControllerTransactionPublishingSkipped`
|
|
43
|
+
- `TransactionControllerTransactionRejectedEvent`
|
|
44
|
+
- `TransactionControllerTransactionStatusUpdatedEvent`
|
|
45
|
+
- `TransactionControllerTransactionSubmittedEvent`
|
|
46
|
+
- `TransactionControllerUnapprovedTransactionAddedEvent`
|
|
47
|
+
- Add optional `simulationData` property to `TransactionMeta` which will be automatically populated ([#4020](https://github.com/MetaMask/core/pull/4020))
|
|
48
|
+
- Add optional `isSimulationEnabled` constructor option to dynamically disable simulation ([#4020](https://github.com/MetaMask/core/pull/4020))
|
|
49
|
+
- Add support for Linea Sepolia (chain ID `0xe705`) ([#3995](https://github.com/MetaMask/core/pull/3995))
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
|
|
53
|
+
- **BREAKING:** Change superclass of TransactionController from BaseController v1 to BaseController v2 ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
54
|
+
- Instead of accepting three arguments, the constructor now takes a single options argument. All of the existing options that were supported in the second argument are now a part of this options object, including `messenger`; `state` (the previous third argument) is also an option.
|
|
55
|
+
- **BREAKING:** Rename `txHistoryLimit` option to `transactionHistoryLimit` ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
56
|
+
- **BREAKING:** Switch some type definitions from `interface` to `type` ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
57
|
+
- These types are affected:
|
|
58
|
+
- `DappSuggestedGasFees`
|
|
59
|
+
- `Log`
|
|
60
|
+
- `MethodData`
|
|
61
|
+
- `TransactionControllerState` (formerly `TransactionState`)
|
|
62
|
+
- `TransactionParams`
|
|
63
|
+
- `TransactionReceipt`
|
|
64
|
+
- This is a breaking change because type aliases have different behavior from interfaces. Specifically, the `Json` type in `@metamask/utils`, which BaseController v2 controller state must conform to, is not compatible with interfaces.
|
|
65
|
+
- **BREAKING:** Align `parsedRegistryMethod` in `MethodData` type with usage ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
66
|
+
- The type of this is now `{ name: string; args: { type: string }[]; } | { name?: any; args?: any; }`, which is a `Json`-compatible version of a type found in `eth-method-registry`.
|
|
67
|
+
- **BREAKING:** Rename `TransactionState` to `TransactionControllerState` ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
68
|
+
- This change aligns this controller with other MetaMask controllers.
|
|
69
|
+
- **BREAKING:** Update allowed events for the `TransactionControllerMessenger` ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
70
|
+
- The restricted messenger must allow the following events:
|
|
71
|
+
- `TransactionController:incomingTransactionBlockReceived`
|
|
72
|
+
- `TransactionController:postTransactionBalanceUpdated`
|
|
73
|
+
- `TransactionController:speedUpTransactionAdded`
|
|
74
|
+
- `TransactionController:transactionApproved`
|
|
75
|
+
- `TransactionController:transactionConfirmed`
|
|
76
|
+
- `TransactionController:transactionDropped`
|
|
77
|
+
- `TransactionController:transactionFinished`
|
|
78
|
+
- `TransactionController:transactionFinished`
|
|
79
|
+
- `TransactionController:transactionPublishingSkipped`
|
|
80
|
+
- `TransactionController:transactionRejected`
|
|
81
|
+
- `TransactionController:transactionStatusUpdated`
|
|
82
|
+
- `TransactionController:transactionSubmitted`
|
|
83
|
+
- `TransactionController:unapprovedTransactionAdded`
|
|
84
|
+
- **BREAKING:** Update `TransactionMeta` type to be compatible with `Json` ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
85
|
+
- As dictated by BaseController v2, any types that are part of state need to be compatible with the `Json` type from `@metamask/utils`.
|
|
86
|
+
- **BREAKING:** Transform `rpc` property on transaction errors so they're JSON-encodable ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
87
|
+
- This change also results in typing this property as `Json` instead of `unknown`, avoiding a "Type instantiation is excessively deep and possibly infinite" error when resolving the `TransactionControllerState` type.
|
|
88
|
+
- **BREAKING:** Bump dependency and peer dependency on `@metamask/approval-controller` to `^6.0.0` ([#4039](https://github.com/MetaMask/core/pull/4039))
|
|
89
|
+
- **BREAKING:** Bump dependency and peer dependency on `@metamask/gas-fee-controller` to `^14.0.0` ([#4039](https://github.com/MetaMask/core/pull/4039))
|
|
90
|
+
- **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to `^18.0.0` ([#4039](https://github.com/MetaMask/core/pull/4039))
|
|
91
|
+
- **BREAKING:** Bump `@metamask/base-controller` to `^5.0.0` ([#4039](https://github.com/MetaMask/core/pull/4039))
|
|
92
|
+
- This version has a number of breaking changes. See the changelog for more.
|
|
93
|
+
- Add dependency on `@ethersproject/providers` `^5.7.0` ([#4020](https://github.com/MetaMask/core/pull/4020))
|
|
94
|
+
- Bump `@metamask/controller-utils` to `^9.0.0` ([#4039](https://github.com/MetaMask/core/pull/4039))
|
|
95
|
+
|
|
96
|
+
### Removed
|
|
97
|
+
|
|
98
|
+
- **BREAKING:** Remove `TransactionConfig` type ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
99
|
+
- The properties in this type have been absorbed into `TransactionControllerOptions`.
|
|
100
|
+
- **BREAKING:** Remove `hub` property from TransactionController ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
101
|
+
- TransactionController now fully makes use of its messenger object to announce various kinds of activities. Instead of subscribing to an event like this:
|
|
102
|
+
```
|
|
103
|
+
transactionController.hub.on(eventName, ...)
|
|
104
|
+
```
|
|
105
|
+
use this:
|
|
106
|
+
```
|
|
107
|
+
messenger.subscribe('TransactionController:${eventName}', ...)
|
|
108
|
+
```
|
|
109
|
+
- The complete list of renamed events are:
|
|
110
|
+
- `incomingTransactionBlock` -> `TransactionController:incomingTransactionBlockReceived`
|
|
111
|
+
- `post-transaction-balance-updated` -> `TransactionController:postTransactionBalanceUpdated`
|
|
112
|
+
- `transaction-approved` -> `TransactionController:transactionApproved`
|
|
113
|
+
- `transaction-confirmed` -> `TransactionController:transactionConfirmed`
|
|
114
|
+
- `transaction-dropped` -> `TransactionController:transactionDropped`
|
|
115
|
+
- `transaction-finished` -> `TransactionController:transactionFinished`
|
|
116
|
+
- `transaction-rejected` -> `TransactionController:transactionRejected`
|
|
117
|
+
- `transaction-status-update` -> `TransactionController:transactionStatusUpdated`
|
|
118
|
+
- `transaction-submitted` -> `TransactionController:transactionSubmitted`
|
|
119
|
+
- `unapprovedTransaction` -> `TransactionController:unapprovedTransactionAdded`
|
|
120
|
+
- Some events announced the state of specific transactions. These have been removed. Instead, subscribe to the appropriate generic event and check for a specific transaction ID in your event handler:
|
|
121
|
+
- `${transactionId}:finished` -> `TransactionController:transactionFinished`
|
|
122
|
+
- `${transactionId}:speedup` -> `TransactionController:speedUpTransactionAdded`
|
|
123
|
+
- `${transactionId}:publish-skip` -> `TransactionController:transactionPublishingSkipped`
|
|
124
|
+
|
|
125
|
+
### Fixed
|
|
126
|
+
|
|
127
|
+
- Fix various methods so that they no longer update transactions in state directly but only via `update` ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
128
|
+
- `addTransaction`
|
|
129
|
+
- `confirmExternalTransaction`
|
|
130
|
+
- `speedUpTransaction`
|
|
131
|
+
- `updateCustodialTransaction`
|
|
132
|
+
- `updateSecurityAlertResponse`
|
|
133
|
+
- `updateTransaction`
|
|
134
|
+
- Fix `handleMethodData` method to update state with an empty registry object instead of blowing up if registry could be found ([#3827](https://github.com/MetaMask/core/pull/3827))
|
|
135
|
+
|
|
10
136
|
## [24.0.0]
|
|
11
137
|
|
|
12
138
|
### Added
|
|
@@ -558,7 +684,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
558
684
|
|
|
559
685
|
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
560
686
|
|
|
561
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@
|
|
687
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@25.1.0...HEAD
|
|
688
|
+
[25.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@25.0.0...@metamask/transaction-controller@25.1.0
|
|
689
|
+
[25.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@24.0.0...@metamask/transaction-controller@25.0.0
|
|
562
690
|
[24.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@23.1.0...@metamask/transaction-controller@24.0.0
|
|
563
691
|
[23.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@23.0.0...@metamask/transaction-controller@23.1.0
|
|
564
692
|
[23.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@22.0.0...@metamask/transaction-controller@23.0.0
|
|
@@ -4,30 +4,32 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkKQTMDKO5js = require('./chunk-KQTMDKO5.js');
|
|
8
|
+
require('./chunk-HS277C77.js');
|
|
8
9
|
require('./chunk-VH47Q6TS.js');
|
|
9
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-RQKICZYP.js');
|
|
10
11
|
require('./chunk-QP75SWIQ.js');
|
|
11
12
|
require('./chunk-ZNZEJDOE.js');
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-7APMBUKB.js');
|
|
13
|
+
require('./chunk-WXQZIUNW.js');
|
|
14
|
+
require('./chunk-4S25HUCL.js');
|
|
15
|
+
require('./chunk-XOLEIJ4W.js');
|
|
16
16
|
require('./chunk-DTDTOMTB.js');
|
|
17
|
-
require('./chunk-
|
|
17
|
+
require('./chunk-NRWEI43Q.js');
|
|
18
|
+
require('./chunk-F3CMU2DM.js');
|
|
18
19
|
require('./chunk-5XBULBP2.js');
|
|
20
|
+
require('./chunk-CXXGL43K.js');
|
|
19
21
|
require('./chunk-7LXE4KHV.js');
|
|
20
|
-
require('./chunk-
|
|
21
|
-
require('./chunk-
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
22
|
+
require('./chunk-P57CVQWK.js');
|
|
23
|
+
require('./chunk-FPLIHYSA.js');
|
|
24
|
+
require('./chunk-QPNEFZB3.js');
|
|
25
|
+
require('./chunk-5OQ373JS.js');
|
|
24
26
|
require('./chunk-UGFBA4GV.js');
|
|
25
|
-
require('./chunk-
|
|
26
|
-
require('./chunk-
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
27
|
+
require('./chunk-O7H2MC7R.js');
|
|
28
|
+
require('./chunk-W3GAOR7Y.js');
|
|
29
|
+
require('./chunk-KZBDAX2Z.js');
|
|
30
|
+
require('./chunk-SJHACWAJ.js');
|
|
31
|
+
require('./chunk-ITDY6AIZ.js');
|
|
29
32
|
require('./chunk-S6VGOPUY.js');
|
|
30
|
-
require('./chunk-HPNXIKFY.js');
|
|
31
33
|
require('./chunk-Z4BLTVTB.js');
|
|
32
34
|
|
|
33
35
|
|
|
@@ -35,5 +37,5 @@ require('./chunk-Z4BLTVTB.js');
|
|
|
35
37
|
|
|
36
38
|
|
|
37
39
|
|
|
38
|
-
exports.ApprovalState =
|
|
40
|
+
exports.ApprovalState = _chunkKQTMDKO5js.ApprovalState; exports.CANCEL_RATE = _chunkKQTMDKO5js.CANCEL_RATE; exports.HARDFORK = _chunkKQTMDKO5js.HARDFORK; exports.SPEED_UP_RATE = _chunkKQTMDKO5js.SPEED_UP_RATE; exports.TransactionController = _chunkKQTMDKO5js.TransactionController;
|
|
39
41
|
//# sourceMappingURL=TransactionController.js.map
|
|
@@ -4,30 +4,32 @@ import {
|
|
|
4
4
|
HARDFORK,
|
|
5
5
|
SPEED_UP_RATE,
|
|
6
6
|
TransactionController
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-B7ODKZQR.mjs";
|
|
8
|
+
import "./chunk-JRBREX22.mjs";
|
|
8
9
|
import "./chunk-NM6OYEPP.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-XKNFL657.mjs";
|
|
10
11
|
import "./chunk-XGRAHX6T.mjs";
|
|
11
12
|
import "./chunk-NHRBO3LU.mjs";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-6MYNWYJK.mjs";
|
|
13
|
+
import "./chunk-QSBIXUMB.mjs";
|
|
14
|
+
import "./chunk-7XPI7KU5.mjs";
|
|
15
|
+
import "./chunk-S2OXIMIM.mjs";
|
|
16
16
|
import "./chunk-Y7ENNK7L.mjs";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-ZQFMTLZJ.mjs";
|
|
18
|
+
import "./chunk-IZI7FQIN.mjs";
|
|
18
19
|
import "./chunk-JRQHIBG5.mjs";
|
|
20
|
+
import "./chunk-VEREDMI2.mjs";
|
|
19
21
|
import "./chunk-FRKQ3Z2L.mjs";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-HXE4JCEK.mjs";
|
|
23
|
+
import "./chunk-ILCQ262Y.mjs";
|
|
24
|
+
import "./chunk-DTONMSFW.mjs";
|
|
25
|
+
import "./chunk-3D3SA6PY.mjs";
|
|
24
26
|
import "./chunk-J56A7UCK.mjs";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-2YXA3K67.mjs";
|
|
28
|
+
import "./chunk-NM4LTWRU.mjs";
|
|
29
|
+
import "./chunk-WERIBZRG.mjs";
|
|
30
|
+
import "./chunk-UXGKS6VI.mjs";
|
|
31
|
+
import "./chunk-Z3HHSD5I.mjs";
|
|
29
32
|
import "./chunk-UQQWZT6C.mjs";
|
|
30
|
-
import "./chunk-LM4NUNMT.mjs";
|
|
31
33
|
import "./chunk-XUI43LEZ.mjs";
|
|
32
34
|
export {
|
|
33
35
|
ApprovalState,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GasFeeEstimateLevel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NM4LTWRU.mjs";
|
|
4
4
|
|
|
5
5
|
// src/utils/gas-flow.ts
|
|
6
6
|
import { weiHexToGweiDec } from "@metamask/controller-utils";
|
|
@@ -59,4 +59,4 @@ export {
|
|
|
59
59
|
getGasFeeFlow,
|
|
60
60
|
mergeGasFeeEstimates
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-2YXA3K67.mjs.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-J56A7UCK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
CHAIN_IDS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Z3HHSD5I.mjs";
|
|
7
7
|
import {
|
|
8
8
|
createModuleLogger,
|
|
9
9
|
projectLogger
|
|
@@ -208,4 +208,4 @@ export {
|
|
|
208
208
|
updateSwapsTransaction,
|
|
209
209
|
updatePostTransactionBalance
|
|
210
210
|
};
|
|
211
|
-
//# sourceMappingURL=chunk-
|
|
211
|
+
//# sourceMappingURL=chunk-3D3SA6PY.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkITDY6AIZjs = require('./chunk-ITDY6AIZ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkS6VGOPUYjs = require('./chunk-S6VGOPUY.js');
|
|
@@ -12,16 +12,16 @@ var log = _utils.createModuleLogger.call(void 0, _chunkS6VGOPUYjs.projectLogger,
|
|
|
12
12
|
var RPC_METHOD = "infura_simulateTransactions";
|
|
13
13
|
var BASE_URL = "https://tx-sentinel-{0}.api.cx.metamask.io/";
|
|
14
14
|
var SUBDOMAIN_BY_CHAIN_ID = {
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
15
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.MAINNET]: "ethereum-mainnet",
|
|
16
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.GOERLI]: "ethereum-goerli",
|
|
17
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.SEPOLIA]: "ethereum-sepolia",
|
|
18
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.LINEA_MAINNET]: "linea-mainnet",
|
|
19
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.LINEA_GOERLI]: "linea-goerli",
|
|
20
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.ARBITRUM]: "arbitrum-mainnet",
|
|
21
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.AVALANCHE]: "avalanche-mainnet",
|
|
22
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.OPTIMISM]: "optimism-mainnet",
|
|
23
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.POLYGON]: "polygon-mainnet",
|
|
24
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.BSC]: "bsc-mainnet"
|
|
25
25
|
};
|
|
26
26
|
async function simulateTransactions(chainId, request) {
|
|
27
27
|
const url = getUrl(chainId);
|
|
@@ -43,4 +43,4 @@ function getUrl(chainId) {
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
exports.simulateTransactions = simulateTransactions;
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-4S25HUCL.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkUGFBA4GVjs = require('./chunk-UGFBA4GV.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkITDY6AIZjs = require('./chunk-ITDY6AIZ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -57,15 +57,15 @@ var ZKSYNC_ERA_SWAPS_TOKEN_OBJECT = {
|
|
|
57
57
|
...ETH_SWAPS_TOKEN_OBJECT
|
|
58
58
|
};
|
|
59
59
|
var SWAPS_CHAINID_DEFAULT_TOKEN_MAP = {
|
|
60
|
-
[
|
|
60
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.MAINNET]: ETH_SWAPS_TOKEN_OBJECT,
|
|
61
61
|
[SWAPS_TESTNET_CHAIN_ID]: TEST_ETH_SWAPS_TOKEN_OBJECT,
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
68
|
-
[
|
|
62
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.BSC]: BNB_SWAPS_TOKEN_OBJECT,
|
|
63
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.POLYGON]: MATIC_SWAPS_TOKEN_OBJECT,
|
|
64
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.GOERLI]: GOERLI_SWAPS_TOKEN_OBJECT,
|
|
65
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.AVALANCHE]: AVAX_SWAPS_TOKEN_OBJECT,
|
|
66
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.OPTIMISM]: OPTIMISM_SWAPS_TOKEN_OBJECT,
|
|
67
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.ARBITRUM]: ARBITRUM_SWAPS_TOKEN_OBJECT,
|
|
68
|
+
[_chunkITDY6AIZjs.CHAIN_IDS.ZKSYNC_ERA]: ZKSYNC_ERA_SWAPS_TOKEN_OBJECT
|
|
69
69
|
};
|
|
70
70
|
var SWAP_TRANSACTION_TYPES = [
|
|
71
71
|
"swap" /* swap */,
|
|
@@ -208,4 +208,4 @@ function sleep(ms) {
|
|
|
208
208
|
|
|
209
209
|
|
|
210
210
|
exports.UPDATE_POST_TX_BALANCE_TIMEOUT = UPDATE_POST_TX_BALANCE_TIMEOUT; exports.UPDATE_POST_TX_BALANCE_ATTEMPTS = UPDATE_POST_TX_BALANCE_ATTEMPTS; exports.DEFAULT_TOKEN_ADDRESS = DEFAULT_TOKEN_ADDRESS; exports.SWAPS_CHAINID_DEFAULT_TOKEN_MAP = SWAPS_CHAINID_DEFAULT_TOKEN_MAP; exports.SWAP_TRANSACTION_TYPES = SWAP_TRANSACTION_TYPES; exports.updateSwapsTransaction = updateSwapsTransaction; exports.updatePostTransactionBalance = updatePostTransactionBalance;
|
|
211
|
-
//# sourceMappingURL=chunk-
|
|
211
|
+
//# sourceMappingURL=chunk-5OQ373JS.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CHAIN_IDS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z3HHSD5I.mjs";
|
|
4
4
|
import {
|
|
5
5
|
projectLogger
|
|
6
6
|
} from "./chunk-UQQWZT6C.mjs";
|
|
@@ -43,4 +43,4 @@ function getUrl(chainId) {
|
|
|
43
43
|
export {
|
|
44
44
|
simulateTransactions
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-7XPI7KU5.mjs.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
determineTransactionType
|
|
3
|
+
} from "./chunk-JRBREX22.mjs";
|
|
1
4
|
import {
|
|
2
5
|
validateTransactionOrigin,
|
|
3
6
|
validateTxParams
|
|
@@ -6,7 +9,7 @@ import {
|
|
|
6
9
|
addGasBuffer,
|
|
7
10
|
estimateGas,
|
|
8
11
|
updateGas
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XKNFL657.mjs";
|
|
10
13
|
import {
|
|
11
14
|
addInitialHistorySnapshot,
|
|
12
15
|
updateTransactionHistory
|
|
@@ -17,19 +20,19 @@ import {
|
|
|
17
20
|
} from "./chunk-NHRBO3LU.mjs";
|
|
18
21
|
import {
|
|
19
22
|
getSimulationData
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import {
|
|
22
|
-
determineTransactionType
|
|
23
|
-
} from "./chunk-JRBREX22.mjs";
|
|
23
|
+
} from "./chunk-QSBIXUMB.mjs";
|
|
24
24
|
import {
|
|
25
25
|
GasFeePoller
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-S2OXIMIM.mjs";
|
|
27
27
|
import {
|
|
28
28
|
IncomingTransactionHelper
|
|
29
29
|
} from "./chunk-Y7ENNK7L.mjs";
|
|
30
30
|
import {
|
|
31
31
|
MultichainTrackingHelper
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZQFMTLZJ.mjs";
|
|
33
|
+
import {
|
|
34
|
+
EtherscanRemoteTransactionSource
|
|
35
|
+
} from "./chunk-IZI7FQIN.mjs";
|
|
33
36
|
import {
|
|
34
37
|
PendingTransactionTracker
|
|
35
38
|
} from "./chunk-JRQHIBG5.mjs";
|
|
@@ -38,17 +41,17 @@ import {
|
|
|
38
41
|
} from "./chunk-FRKQ3Z2L.mjs";
|
|
39
42
|
import {
|
|
40
43
|
LineaGasFeeFlow
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-HXE4JCEK.mjs";
|
|
42
45
|
import {
|
|
43
46
|
DefaultGasFeeFlow
|
|
44
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-ILCQ262Y.mjs";
|
|
45
48
|
import {
|
|
46
49
|
updateGasFees
|
|
47
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-DTONMSFW.mjs";
|
|
48
51
|
import {
|
|
49
52
|
updatePostTransactionBalance,
|
|
50
53
|
updateSwapsTransaction
|
|
51
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-3D3SA6PY.mjs";
|
|
52
55
|
import {
|
|
53
56
|
getIncreasedPriceFromExisting,
|
|
54
57
|
isEIP1559Transaction,
|
|
@@ -62,8 +65,11 @@ import {
|
|
|
62
65
|
validateMinimumIncrease
|
|
63
66
|
} from "./chunk-J56A7UCK.mjs";
|
|
64
67
|
import {
|
|
65
|
-
|
|
66
|
-
} from "./chunk-
|
|
68
|
+
OptimismLayer1GasFeeFlow
|
|
69
|
+
} from "./chunk-WERIBZRG.mjs";
|
|
70
|
+
import {
|
|
71
|
+
updateTransactionLayer1GasFee
|
|
72
|
+
} from "./chunk-UXGKS6VI.mjs";
|
|
67
73
|
import {
|
|
68
74
|
projectLogger
|
|
69
75
|
} from "./chunk-UQQWZT6C.mjs";
|
|
@@ -127,7 +133,7 @@ function getDefaultTransactionControllerState() {
|
|
|
127
133
|
lastFetchedBlockNumbers: {}
|
|
128
134
|
};
|
|
129
135
|
}
|
|
130
|
-
var _internalEvents, _incomingTransactionOptions, _pendingTransactionOptions, _transactionHistoryLimit, _isSimulationEnabled, _multichainTrackingHelper, _createNonceTracker, createNonceTracker_fn, _createIncomingTransactionHelper, createIncomingTransactionHelper_fn, _createPendingTransactionTracker, createPendingTransactionTracker_fn, _checkForPendingTransactionAndStartPolling, _stopAllTracking, stopAllTracking_fn, _removeIncomingTransactionHelperListeners, removeIncomingTransactionHelperListeners_fn, _addIncomingTransactionHelperListeners, addIncomingTransactionHelperListeners_fn, _removePendingTransactionTrackerListeners, removePendingTransactionTrackerListeners_fn, _addPendingTransactionTrackerListeners, addPendingTransactionTrackerListeners_fn, _getNonceTrackerPendingTransactions, getNonceTrackerPendingTransactions_fn, _getGasFeeFlows, getGasFeeFlows_fn, _updateTransactionInternal, updateTransactionInternal_fn, _simulateTransaction, simulateTransaction_fn;
|
|
136
|
+
var _internalEvents, _incomingTransactionOptions, _pendingTransactionOptions, _transactionHistoryLimit, _isSimulationEnabled, _multichainTrackingHelper, _createNonceTracker, createNonceTracker_fn, _createIncomingTransactionHelper, createIncomingTransactionHelper_fn, _createPendingTransactionTracker, createPendingTransactionTracker_fn, _checkForPendingTransactionAndStartPolling, _stopAllTracking, stopAllTracking_fn, _removeIncomingTransactionHelperListeners, removeIncomingTransactionHelperListeners_fn, _addIncomingTransactionHelperListeners, addIncomingTransactionHelperListeners_fn, _removePendingTransactionTrackerListeners, removePendingTransactionTrackerListeners_fn, _addPendingTransactionTrackerListeners, addPendingTransactionTrackerListeners_fn, _getNonceTrackerPendingTransactions, getNonceTrackerPendingTransactions_fn, _getGasFeeFlows, getGasFeeFlows_fn, _getLayer1GasFeeFlows, getLayer1GasFeeFlows_fn, _updateTransactionInternal, updateTransactionInternal_fn, _simulateTransaction, simulateTransaction_fn;
|
|
131
137
|
var TransactionController = class extends BaseController {
|
|
132
138
|
/**
|
|
133
139
|
* Constructs a TransactionController.
|
|
@@ -205,6 +211,7 @@ var TransactionController = class extends BaseController {
|
|
|
205
211
|
__privateAdd(this, _addPendingTransactionTrackerListeners);
|
|
206
212
|
__privateAdd(this, _getNonceTrackerPendingTransactions);
|
|
207
213
|
__privateAdd(this, _getGasFeeFlows);
|
|
214
|
+
__privateAdd(this, _getLayer1GasFeeFlows);
|
|
208
215
|
__privateAdd(this, _updateTransactionInternal);
|
|
209
216
|
__privateAdd(this, _simulateTransaction);
|
|
210
217
|
__privateAdd(this, _internalEvents, new EventEmitter());
|
|
@@ -293,6 +300,7 @@ var TransactionController = class extends BaseController {
|
|
|
293
300
|
blockTracker
|
|
294
301
|
});
|
|
295
302
|
this.gasFeeFlows = __privateMethod(this, _getGasFeeFlows, getGasFeeFlows_fn).call(this);
|
|
303
|
+
this.layer1GasFeeFlows = __privateMethod(this, _getLayer1GasFeeFlows, getLayer1GasFeeFlows_fn).call(this);
|
|
296
304
|
const gasFeePoller = new GasFeePoller({
|
|
297
305
|
// Default gas fee polling is not yet supported by the clients
|
|
298
306
|
gasFeeFlows: this.gasFeeFlows.slice(0, -1),
|
|
@@ -302,6 +310,7 @@ var TransactionController = class extends BaseController {
|
|
|
302
310
|
}),
|
|
303
311
|
getGasFeeControllerEstimates: this.getGasFeeEstimates,
|
|
304
312
|
getTransactions: () => this.state.transactions,
|
|
313
|
+
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
305
314
|
onStateChange: (listener) => {
|
|
306
315
|
this.messagingSystem.subscribe(
|
|
307
316
|
"TransactionController:stateChange",
|
|
@@ -1131,14 +1140,20 @@ var TransactionController = class extends BaseController {
|
|
|
1131
1140
|
editableParams.txParams
|
|
1132
1141
|
);
|
|
1133
1142
|
const updatedTransaction = merge({}, transactionMeta, editableParams);
|
|
1143
|
+
const ethQuery = __privateGet(this, _multichainTrackingHelper).getEthQuery({
|
|
1144
|
+
networkClientId: transactionMeta.networkClientId,
|
|
1145
|
+
chainId: transactionMeta.chainId
|
|
1146
|
+
});
|
|
1134
1147
|
const { type } = await determineTransactionType(
|
|
1135
1148
|
updatedTransaction.txParams,
|
|
1136
|
-
|
|
1137
|
-
networkClientId: transactionMeta.networkClientId,
|
|
1138
|
-
chainId: transactionMeta.chainId
|
|
1139
|
-
})
|
|
1149
|
+
ethQuery
|
|
1140
1150
|
);
|
|
1141
1151
|
updatedTransaction.type = type;
|
|
1152
|
+
await updateTransactionLayer1GasFee({
|
|
1153
|
+
ethQuery,
|
|
1154
|
+
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
1155
|
+
transactionMeta: updatedTransaction
|
|
1156
|
+
});
|
|
1142
1157
|
this.updateTransaction(
|
|
1143
1158
|
updatedTransaction,
|
|
1144
1159
|
`Update Editable Params for ${txId}`
|
|
@@ -1407,26 +1422,29 @@ var TransactionController = class extends BaseController {
|
|
|
1407
1422
|
`NetworkController:getNetworkClientById`,
|
|
1408
1423
|
networkClientId
|
|
1409
1424
|
).configuration.type === NetworkClientType.Custom : this.getNetworkState().providerConfig.type === NetworkType.rpc;
|
|
1425
|
+
const ethQuery = __privateGet(this, _multichainTrackingHelper).getEthQuery({
|
|
1426
|
+
networkClientId,
|
|
1427
|
+
chainId
|
|
1428
|
+
});
|
|
1410
1429
|
await updateGas({
|
|
1411
|
-
ethQuery
|
|
1412
|
-
networkClientId,
|
|
1413
|
-
chainId
|
|
1414
|
-
}),
|
|
1430
|
+
ethQuery,
|
|
1415
1431
|
chainId,
|
|
1416
1432
|
isCustomNetwork,
|
|
1417
1433
|
txMeta: transactionMeta
|
|
1418
1434
|
});
|
|
1419
1435
|
await updateGasFees({
|
|
1420
1436
|
eip1559: isEIP1559Compatible,
|
|
1421
|
-
ethQuery
|
|
1422
|
-
networkClientId,
|
|
1423
|
-
chainId
|
|
1424
|
-
}),
|
|
1437
|
+
ethQuery,
|
|
1425
1438
|
gasFeeFlows: this.gasFeeFlows,
|
|
1426
1439
|
getGasFeeEstimates: this.getGasFeeEstimates,
|
|
1427
1440
|
getSavedGasFees: this.getSavedGasFees.bind(this),
|
|
1428
1441
|
txMeta: transactionMeta
|
|
1429
1442
|
});
|
|
1443
|
+
await updateTransactionLayer1GasFee({
|
|
1444
|
+
ethQuery,
|
|
1445
|
+
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
1446
|
+
transactionMeta
|
|
1447
|
+
});
|
|
1430
1448
|
}
|
|
1431
1449
|
onBootCleanup() {
|
|
1432
1450
|
this.submitApprovedTransactions();
|
|
@@ -2267,6 +2285,10 @@ _getGasFeeFlows = new WeakSet();
|
|
|
2267
2285
|
getGasFeeFlows_fn = function() {
|
|
2268
2286
|
return [new LineaGasFeeFlow(), new DefaultGasFeeFlow()];
|
|
2269
2287
|
};
|
|
2288
|
+
_getLayer1GasFeeFlows = new WeakSet();
|
|
2289
|
+
getLayer1GasFeeFlows_fn = function() {
|
|
2290
|
+
return [new OptimismLayer1GasFeeFlow()];
|
|
2291
|
+
};
|
|
2270
2292
|
_updateTransactionInternal = new WeakSet();
|
|
2271
2293
|
updateTransactionInternal_fn = function(transactionMeta, { note, skipHistory }) {
|
|
2272
2294
|
const normalizedTransaction = {
|
|
@@ -2310,4 +2332,4 @@ export {
|
|
|
2310
2332
|
ApprovalState,
|
|
2311
2333
|
TransactionController
|
|
2312
2334
|
};
|
|
2313
|
-
//# sourceMappingURL=chunk-
|
|
2335
|
+
//# sourceMappingURL=chunk-B7ODKZQR.mjs.map
|