@metamask/transaction-controller 18.2.0 → 18.3.1
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 +372 -0
- package/dist/TransactionController.d.ts +10 -10
- package/dist/TransactionController.d.ts.map +1 -1
- package/dist/TransactionController.js +50 -38
- package/dist/TransactionController.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/helpers/IncomingTransactionHelper.d.ts.map +1 -1
- package/dist/helpers/IncomingTransactionHelper.js +4 -0
- package/dist/helpers/IncomingTransactionHelper.js.map +1 -1
- package/dist/helpers/PendingTransactionTracker.d.ts +1 -2
- package/dist/helpers/PendingTransactionTracker.d.ts.map +1 -1
- package/dist/helpers/PendingTransactionTracker.js +24 -12
- package/dist/helpers/PendingTransactionTracker.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/gas.d.ts.map +1 -1
- package/dist/utils/gas.js +2 -0
- package/dist/utils/gas.js.map +1 -1
- package/dist/utils/history.js +8 -2
- package/dist/utils/history.js.map +1 -1
- package/dist/utils/nonce.d.ts.map +1 -1
- package/dist/utils/nonce.js +2 -1
- package/dist/utils/nonce.js.map +1 -1
- package/dist/utils/swaps.js +4 -0
- package/dist/utils/swaps.js.map +1 -1
- package/dist/utils/transaction-type.d.ts.map +1 -1
- package/dist/utils/transaction-type.js +19 -12
- package/dist/utils/transaction-type.js.map +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +6 -0
- package/dist/utils/utils.js.map +1 -1
- package/dist/utils/validation.js +2 -0
- package/dist/utils/validation.js.map +1 -1
- package/package.json +5 -5
- package/dist/EtherscanRemoteTransactionSource.d.ts +0 -15
- package/dist/EtherscanRemoteTransactionSource.d.ts.map +0 -1
- package/dist/EtherscanRemoteTransactionSource.js +0 -122
- package/dist/EtherscanRemoteTransactionSource.js.map +0 -1
- package/dist/IncomingTransactionHelper.d.ts +0 -25
- package/dist/IncomingTransactionHelper.d.ts.map +0 -1
- package/dist/IncomingTransactionHelper.js +0 -198
- package/dist/IncomingTransactionHelper.js.map +0 -1
- package/dist/etherscan.d.ts +0 -64
- package/dist/etherscan.d.ts.map +0 -1
- package/dist/etherscan.js +0 -109
- package/dist/etherscan.js.map +0 -1
- package/dist/external-transactions.d.ts +0 -10
- package/dist/external-transactions.d.ts.map +0 -1
- package/dist/external-transactions.js +0 -36
- package/dist/external-transactions.js.map +0 -1
- package/dist/history.d.ts +0 -15
- package/dist/history.d.ts.map +0 -1
- package/dist/history.js +0 -75
- package/dist/history.js.map +0 -1
- package/dist/mocks/txsMock.d.ts +0 -64
- package/dist/mocks/txsMock.d.ts.map +0 -1
- package/dist/mocks/txsMock.js +0 -515
- package/dist/mocks/txsMock.js.map +0 -1
- package/dist/transaction-type.d.ts +0 -14
- package/dist/transaction-type.d.ts.map +0 -1
- package/dist/transaction-type.js +0 -114
- package/dist/transaction-type.js.map +0 -1
- package/dist/utils.d.ts +0 -72
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -235
- package/dist/utils.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [18.3.1]
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fix incorrect transaction statuses ([#3676](https://github.com/MetaMask/core/pull/3676))
|
|
12
|
+
- Fix `dropped` status detection by ignoring transactions on other chains.
|
|
13
|
+
- Start polling if network changes and associated transactions are pending.
|
|
14
|
+
- Record `r`, `s`, and `v` values even if zero.
|
|
15
|
+
- Only fail transactions if receipt `status` is explicitly `0x0`.
|
|
16
|
+
- Fix incoming transactions on Linea Goerli ([#3674](https://github.com/MetaMask/core/pull/3674))
|
|
17
|
+
|
|
18
|
+
## [18.3.0]
|
|
19
|
+
### Added
|
|
20
|
+
- Add optional `getExternalPendingTransactions` callback argument to constructor ([#3587](https://github.com/MetaMask/core/pull/3587))
|
|
21
|
+
|
|
22
|
+
## [18.2.0]
|
|
23
|
+
### Added
|
|
24
|
+
- Add the `customNonceValue` property to the transaction metadata ([#3579](https://github.com/MetaMask/core/pull/3579))
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Update transaction metadata after approval if the approval result includes the `value.txMeta` property ([#3579](https://github.com/MetaMask/core/pull/3579))
|
|
28
|
+
- Add `type` property to all incoming transactions ([#3579](https://github.com/MetaMask/core/pull/3579))
|
|
29
|
+
|
|
30
|
+
## [18.1.0]
|
|
31
|
+
### Added
|
|
32
|
+
- Add `cancelMultiplier` and `speedUpMultiplier` constructor arguments to optionally override the default multipliers of `1.5` and `1.1` respectively ([#2678](https://github.com/MetaMask/core/pull/2678))
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- Populate the `preTxBalance` property before publishing transactions with the `swap` type ([#2678](https://github.com/MetaMask/core/pull/2678))
|
|
36
|
+
- Change the status of transactions with matching nonces to `dropped` when confirming a transaction ([#2678](https://github.com/MetaMask/core/pull/2678))
|
|
37
|
+
|
|
38
|
+
## [18.0.0]
|
|
39
|
+
### Added
|
|
40
|
+
- Add `updateEditableParams` method ([#2056](https://github.com/MetaMask/core/pull/2056))
|
|
41
|
+
- Add `initApprovals` method to trigger the approval flow for any pending transactions during initialisation ([#2056](https://github.com/MetaMask/core/pull/2056))
|
|
42
|
+
- Add `getTransactions` method to search transactions using the given criteria and options ([#2056](https://github.com/MetaMask/core/pull/2056))
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
- **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
|
|
46
|
+
- This is breaking because the type of the `messenger` has backward-incompatible changes. See the changelog for this package for more.
|
|
47
|
+
- **BREAKING:** Add `finished` and `publish-skip` events to `Events` type
|
|
48
|
+
- **BREAKING:** Update `TransactionReceipt` type so `transactionIndex` is now a string rather than a number ([#2063](https://github.com/MetaMask/core/pull/2063))
|
|
49
|
+
- Bump `nonce-tracker` to ^3.0.0 ([#2040](https://github.com/MetaMask/core/pull/2040))
|
|
50
|
+
- The controller now emits a `transaction-status-update` event each time the status of a transaction changes (e.g. submitted, rejected, etc.) ([#2027](https://github.com/MetaMask/core/pull/2027))
|
|
51
|
+
- Make `getCurrentAccountEIP1559Compatibility` constructor parameter optional ([#2056](https://github.com/MetaMask/core/pull/2056))
|
|
52
|
+
- Normalize the gas values provided to the `speedUpTransaction` and `stopTransaction` methods ([#2056](https://github.com/MetaMask/core/pull/2056))
|
|
53
|
+
- Persist any property changes performed by the `afterSign` hook ([#2056](https://github.com/MetaMask/core/pull/2056))
|
|
54
|
+
- Report success to the approver if publishing is skipped by the `beforePublish` hook ([#2056](https://github.com/MetaMask/core/pull/2056))
|
|
55
|
+
- Update `postTxBalance` after all swap transactions ([#2056](https://github.com/MetaMask/core/pull/2056))
|
|
56
|
+
- Bump `@metamask/approval-controller` to ^5.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
|
|
57
|
+
- Bump `@metamask/controller-utils` to ^6.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
|
|
58
|
+
- Bump `@metamask/gas-fee-controller` to ^11.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
|
|
59
|
+
- Bump `@metamask/network-controller` to ^17.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
|
|
60
|
+
|
|
61
|
+
## [17.0.0]
|
|
62
|
+
### Added
|
|
63
|
+
- **BREAKING:** Add additional support swaps support ([#1877](https://github.com/MetaMask/core/pull/1877))
|
|
64
|
+
- Swap transaction updates can be prevented by setting `disableSwaps` as `true`. If not set it will default to `false`.
|
|
65
|
+
- If `disableSwaps` is `false` or not set, then the `createSwapsTransaction` callback MUST be defined.
|
|
66
|
+
- Add optional hooks to support alternate flows ([#1787](https://github.com/MetaMask/core/pull/1787))
|
|
67
|
+
- Add the `getAdditionalSignArguments` hook to provide additional arguments when signing.
|
|
68
|
+
- Add the `beforeApproveOnInit` hook to execute additional logic before starting an approval flow for a transaction during initialization. Return `false` to skip the transaction.
|
|
69
|
+
- Add the `afterSign` hook to execute additional logic after signing a transaction. Return `false` to not change the `status` to `signed`.
|
|
70
|
+
- Add the `beforePublish` hook to execute additional logic before publishing a transaction. Return `false` to prevent the transaction being submitted.
|
|
71
|
+
- Add additional persisted transaction support during initialization and on network change ([#1916](https://github.com/MetaMask/core/pull/1916))
|
|
72
|
+
- Initialise approvals for unapproved transactions on the current network.
|
|
73
|
+
- Add missing gas values for unapproved transactions on the current network.
|
|
74
|
+
- Submit any approved transactions on the current network.
|
|
75
|
+
- Support saved gas fees ([#1966](https://github.com/MetaMask/core/pull/1966))
|
|
76
|
+
- Add optional `getSavedGasFees` callback to constructor.
|
|
77
|
+
- Add `updateCustodialTransaction` method to update custodial transactions ([#2018](https://github.com/MetaMask/core/pull/2018))
|
|
78
|
+
- Add `accessList` to txParam types ([#2016](https://github.com/MetaMask/core/pull/2016))
|
|
79
|
+
- Add `estimateGasBuffered` method to estimate gas and apply a specific buffer multiplier ([#2021](https://github.com/MetaMask/core/pull/2021))
|
|
80
|
+
- Add `updateSecurityAlertResponse` method ([#1985](https://github.com/MetaMask/core/pull/1985))
|
|
81
|
+
- Add gas values validation ([#1978](https://github.com/MetaMask/core/pull/1978))
|
|
82
|
+
- Add `approveTransactionsWithSameNonce` method ([#1961](https://github.com/MetaMask/core/pull/1961))
|
|
83
|
+
- Add `clearUnapprovedTransactions` method ([#1979](https://github.com/MetaMask/core/pull/1979))
|
|
84
|
+
- Add `updatePreviousGasParams` method ([#1943](https://github.com/MetaMask/core/pull/1943))
|
|
85
|
+
- Emit additional events to support metrics in the clients ([#1894](https://github.com/MetaMask/core/pull/1894))
|
|
86
|
+
- Populate the `firstRetryBlockNumber`, `retryCount`, and `warning` properties in the transaction metadata. ([#1896](https://github.com/MetaMask/core/pull/1896))
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
- **BREAKING:** Pending transactions are now automatically resubmitted. ([#1896](https://github.com/MetaMask/core/pull/1896))
|
|
90
|
+
- This can be disabled by setting the new `pendingTransactions.isResubmitEnabled` constructor option to `false`.
|
|
91
|
+
- **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^16.0.0
|
|
92
|
+
- Persist specific error properties in core transaction metadata ([#1915](https://github.com/MetaMask/core/pull/1915))
|
|
93
|
+
- Create `TransactionError` type with explicit properties.
|
|
94
|
+
- Align core transaction error messages with extension ([#1980](https://github.com/MetaMask/core/pull/1980))
|
|
95
|
+
- Catch of the `initApprovals` method to skip logging when the error is `userRejectedRequest`.
|
|
96
|
+
- Create an additional transaction metadata entry when calling `stopTransaction` ([#1998](https://github.com/MetaMask/core/pull/1998))
|
|
97
|
+
- Bump dependency `@metamask/eth-query` from ^3.0.1 to ^4.0.0 ([#2028](https://github.com/MetaMask/core/pull/2028))
|
|
98
|
+
- Bump dependency and peer dependency on `@metamask/gas-fee-controller` to ^10.0.1
|
|
99
|
+
- Bump @metamask/utils from 8.1.0 to 8.2.0 ([#1957](https://github.com/MetaMask/core/pull/1957))
|
|
100
|
+
|
|
101
|
+
## [16.0.0]
|
|
102
|
+
### Changed
|
|
103
|
+
- **BREAKING:** Bump dependency and peer dependency on `@metamask/gas-fee-controller` to ^10.0.0
|
|
104
|
+
- Bump dependency and peer dependency on `@metamask/network-controller` to ^15.1.0
|
|
105
|
+
|
|
106
|
+
## [15.0.0]
|
|
107
|
+
### Changed
|
|
108
|
+
- **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^15.0.0
|
|
109
|
+
- Bump dependency on `@metamask/rpc-errors` to ^6.1.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
|
|
110
|
+
- Bump dependency and peer dependency on `@metamask/approval-controller` to ^4.0.1
|
|
111
|
+
|
|
112
|
+
## [14.0.0]
|
|
113
|
+
### Added
|
|
114
|
+
- **BREAKING:** Add required `getPermittedAccounts` argument to constructor, used to validate `from` addresses ([#1722](https://github.com/MetaMask/core/pull/1722))
|
|
115
|
+
- Add `securityProviderRequest` option to constructor ([#1725](https://github.com/MetaMask/core/pull/1725))
|
|
116
|
+
- Add `method` option to `addTransaction` method ([#1725](https://github.com/MetaMask/core/pull/1725))
|
|
117
|
+
- Add `securityProviderRequest` property to TransactionMetaBase ([#1725](https://github.com/MetaMask/core/pull/1725))
|
|
118
|
+
- Add SecurityProviderRequest type ([#1725](https://github.com/MetaMask/core/pull/1725))
|
|
119
|
+
- Update `addTransaction` to set `securityProviderRequest` on transaction metadata when requested to do so ([#1725](https://github.com/MetaMask/core/pull/1725))
|
|
120
|
+
- Update `txParams` validation to validate `chainId` ([#1723](https://github.com/MetaMask/core/pull/1723))
|
|
121
|
+
- Update `addTransaction` to ensure allowed `from` address when `origin` is specified ([#1722](https://github.com/MetaMask/core/pull/1722))
|
|
122
|
+
|
|
123
|
+
### Changed
|
|
124
|
+
- Bump dependency on `@metamask/utils` to ^8.1.0 ([#1639](https://github.com/MetaMask/core/pull/1639))
|
|
125
|
+
- Bump dependency and peer dependency on `@metamask/approval-controller` to ^4.0.0
|
|
126
|
+
- Bump dependency on `@metamask/base-controller` to ^3.2.3
|
|
127
|
+
- Bump dependency on `@metamask/controller-utils` to ^5.0.2
|
|
128
|
+
- Bump dependency and peer dependency on `@metamask/network-controller` to ^14.0.0
|
|
129
|
+
|
|
130
|
+
### Removed
|
|
131
|
+
- **BREAKING:** Remove `interval` config option ([#1746](https://github.com/MetaMask/core/pull/1746))
|
|
132
|
+
- The block tracker (which has its own interval) is now used to poll for pending transactions instead.
|
|
133
|
+
- **BREAKING:** Remove `poll` method ([#1746](https://github.com/MetaMask/core/pull/1746))
|
|
134
|
+
- The block tracker is assumed to be running, TransactionController does not offer a way to stop it.
|
|
135
|
+
- **BREAKING:** Remove `queryTransactionStatuses` method ([#1746](https://github.com/MetaMask/core/pull/1746))
|
|
136
|
+
- This functionality has been moved to a private interface and there is no way to use it externally.
|
|
137
|
+
|
|
138
|
+
## [13.0.0]
|
|
139
|
+
### Changed
|
|
140
|
+
- **BREAKING**: Add required `getCurrentAccountEIP1559Compatibility` and `getCurrentNetworkEIP1559Compatibility` callback arguments to constructor ([#1693](https://github.com/MetaMask/core/pull/1693))
|
|
141
|
+
- Update `validateTxParams` to throw standardised errors using the `@metamask/rpc-errors` package ([#1690](https://github.com/MetaMask/core/pull/1690))
|
|
142
|
+
- The dependency `eth-rpc-errors` has been replaced by `@metamask/rpc-errors`
|
|
143
|
+
- Preserve `type` transaction parameter for legacy transactions ([#1713](https://github.com/MetaMask/core/pull/1713))
|
|
144
|
+
- Update TypeScript to v4.8.x ([#1718](https://github.com/MetaMask/core/pull/1718))
|
|
145
|
+
|
|
146
|
+
## [12.0.0]
|
|
147
|
+
### Changed
|
|
148
|
+
- **BREAKING**: Use only `chainId` to determine if a transaction belongs to the current network ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
149
|
+
- No longer uses `networkID` as a fallback if `chainId` is missing
|
|
150
|
+
- **BREAKING**: Change `TransactionMeta.chainId` to be required ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
151
|
+
- **BREAKING**: Bump peer dependency on `@metamask/network-controller` to ^13.0.0 ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
152
|
+
- Update `TransactionMeta.networkID` as deprecated ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
153
|
+
- Change `TransactionMeta.networkID` to be readonly ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
154
|
+
- Bump dependency on `@metamask/controller-utils` to ^5.0.0 ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
155
|
+
|
|
156
|
+
### Removed
|
|
157
|
+
- Remove `networkId` param from `RemoteTransactionSource.isSupportedNetwork()` interface ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
158
|
+
- Remove `currentNetworkId` property from `RemoteTransactionSourceRequest` ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
159
|
+
|
|
160
|
+
## [11.1.0]
|
|
161
|
+
### Added
|
|
162
|
+
- Add `type` property to the transaction metadata ([#1670](https://github.com/MetaMask/core/pull/1670))
|
|
163
|
+
|
|
164
|
+
## [11.0.0]
|
|
165
|
+
### Added
|
|
166
|
+
- Add optional `getLastBlockVariations` method to `RemoteTransactionSource` type ([#1668](https://github.com/MetaMask/core/pull/1668))
|
|
167
|
+
- Add `updateTransactionGasFees` method to `TransactionController` ([#1674](https://github.com/MetaMask/core/pull/1674))
|
|
168
|
+
- Add `r`, `s` and `v` properties to the transaction metadata ([#1664](https://github.com/MetaMask/core/pull/1664))
|
|
169
|
+
- Add `sendFlowHistory` property to the transaction metadata ([#1665](https://github.com/MetaMask/core/pull/1665))
|
|
170
|
+
- Add `updateTransactionSendFlowHistory` method to `TransactionController` ([#1665](https://github.com/MetaMask/core/pull/1665))
|
|
171
|
+
- Add `originalGasEstimate` property to the transaction metadata ([#1656](https://github.com/MetaMask/core/pull/1656))
|
|
172
|
+
- Add `incomingTransactions.queryEntireHistory` constructor option ([#1652](https://github.com/MetaMask/core/pull/1652))
|
|
173
|
+
|
|
174
|
+
### Changed
|
|
175
|
+
- **BREAKING**: Remove `apiKey` property from `RemoteTransactionSourceRequest` type ([#1668](https://github.com/MetaMask/core/pull/1668))
|
|
176
|
+
- **BREAKING**: Remove unused `FetchAllOptions` type from `TransactionController` ([#1668](https://github.com/MetaMask/core/pull/1668))
|
|
177
|
+
- **BREAKING**: Remove `incomingTransactions.apiKey` constructor option ([#1668](https://github.com/MetaMask/core/pull/1668))
|
|
178
|
+
- **BREAKING**: Rename the `transaction` object to `txParams` in the transaction metadata ([#1651](https://github.com/MetaMask/core/pull/1651))
|
|
179
|
+
- **BREAKING**: Add `disableHistory` constructor option ([#1657](https://github.com/MetaMask/core/pull/1657))
|
|
180
|
+
- Defaults to `false` but will increase state size considerably unless disabled
|
|
181
|
+
- **BREAKING**: Add `disableSendFlowHistory` constructor option ([#1665](https://github.com/MetaMask/core/pull/1665))
|
|
182
|
+
- Defaults to `false` but will increase state size considerably unless disabled
|
|
183
|
+
- **BREAKING**: Rename the `transactionHash` property to `hash` in the transaction metadata
|
|
184
|
+
|
|
185
|
+
### Fixed
|
|
186
|
+
- Fix the sorting of incoming and updated transactions ([#1652](https://github.com/MetaMask/core/pull/1652))
|
|
187
|
+
- Prevent rate limit errors when `incomingTransactions.includeTokenTransfers` is `true` by by alternating Etherscan request types on each update ([#1668](https://github.com/MetaMask/core/pull/1668))
|
|
188
|
+
|
|
189
|
+
## [10.0.0]
|
|
190
|
+
### Added
|
|
191
|
+
- Add `submittedTime` to the transaction metadata ([#1645](https://github.com/MetaMask/core/pull/1645))
|
|
192
|
+
- Add optional `actionId` argument to `addTransaction` and `speedUpTransaction` to prevent duplicate requests ([#1582](https://github.com/MetaMask/core/pull/1582))
|
|
193
|
+
- Add `confirmExternalTransaction` method ([#1625](https://github.com/MetaMask/core/pull/1625))
|
|
194
|
+
|
|
195
|
+
### Changed
|
|
196
|
+
- **BREAKING**: Rename `rawTransaction` to `rawTx` in the transaction metadata ([#1624](https://github.com/MetaMask/core/pull/1624))
|
|
197
|
+
|
|
198
|
+
## [9.2.0]
|
|
199
|
+
### Added
|
|
200
|
+
- Persist `estimatedBaseFee` in `stopTransaction` and `speedUpTransaction` ([#1621](https://github.com/MetaMask/core/pull/1621))
|
|
201
|
+
- Add `securityAlertResponse` to `addTransaction` `opts` argument ([#1636](https://github.com/MetaMask/core/pull/1636))
|
|
202
|
+
|
|
203
|
+
## [9.1.0]
|
|
204
|
+
### Added
|
|
205
|
+
- Add `blockTimestamp` to `TransactionMetaBase` type ([#1616](https://github.com/MetaMask/core/pull/1616))
|
|
206
|
+
- Update `queryTransactionStatuses` to populate `blockTimestamp` on each transaction when it is verified ([#1616](https://github.com/MetaMask/core/pull/1616))
|
|
207
|
+
|
|
208
|
+
### Changed
|
|
209
|
+
- Bump dependency and peer dependency on `@metamask/approval-controller` to ^3.5.1
|
|
210
|
+
- Bump dependency on `@metamask/base-controller` to ^3.2.1
|
|
211
|
+
- Bump dependency on `@metamask/controller-utils` to ^4.3.2
|
|
212
|
+
- Bump dependency and peer dependency on `@metamask/network-controller` to ^12.1.2
|
|
213
|
+
|
|
214
|
+
## [9.0.0]
|
|
215
|
+
### Added
|
|
216
|
+
- Add `baseFeePerGas` to transaction metadata ([#1590](https://github.com/MetaMask/core/pull/1590))
|
|
217
|
+
- Add `txReceipt` to transaction metadata ([#1592](https://github.com/MetaMask/core/pull/1592))
|
|
218
|
+
- Add `initApprovals` method to generate approval requests from unapproved transactions ([#1575](https://github.com/MetaMask/core/pull/1575))
|
|
219
|
+
- Add `dappSuggestedGasFees` to transaction metadata ([#1617](https://github.com/MetaMask/core/pull/1617))
|
|
220
|
+
- Add optional `incomingTransactions` constructor arguments ([#1579](https://github.com/MetaMask/core/pull/1579))
|
|
221
|
+
- `apiKey`
|
|
222
|
+
- `includeTokenTransfers`
|
|
223
|
+
- `isEnabled`
|
|
224
|
+
- `updateTransactions`
|
|
225
|
+
- Add incoming transaction methods ([#1579](https://github.com/MetaMask/core/pull/1579))
|
|
226
|
+
- `startIncomingTransactionPolling`
|
|
227
|
+
- `stopIncomingTransactionPolling`
|
|
228
|
+
- `updateIncomingTransactions`
|
|
229
|
+
- Add `requireApproval` option to `addTransaction` method options ([#1580](https://github.com/MetaMask/core/pull/1580))
|
|
230
|
+
- Add `address` argument to `wipeTransactions` method ([#1573](https://github.com/MetaMask/core/pull/1573))
|
|
231
|
+
|
|
232
|
+
### Changed
|
|
233
|
+
- **BREAKING**: Add required `getSelectedAddress` callback argument to constructor ([#1579](https://github.com/MetaMask/core/pull/1579))
|
|
234
|
+
- **BREAKING**: Add `isSupportedNetwork` method to `RemoteTransactionSource` interface ([#1579](https://github.com/MetaMask/core/pull/1579))
|
|
235
|
+
- **BREAKING**: Move all but first argument to options bag in `addTransaction` method ([#1576](https://github.com/MetaMask/core/pull/1576))
|
|
236
|
+
- **BREAKING**: Update properties of `RemoteTransactionSourceRequest` type ([#1579](https://github.com/MetaMask/core/pull/1579))
|
|
237
|
+
- The `fromBlock` property has changed from `string` to `number`
|
|
238
|
+
- The `networkType` property has been removed
|
|
239
|
+
- This type is intended mainly for internal use, so it's likely this change doesn't affect most projects
|
|
240
|
+
|
|
241
|
+
### Removed
|
|
242
|
+
- **BREAKING**: Remove `fetchAll` method ([#1579](https://github.com/MetaMask/core/pull/1579))
|
|
243
|
+
- This method was used to fetch transaction history from Etherscan
|
|
244
|
+
- This is now handled automatically by the controller on each new block, if polling is enabled
|
|
245
|
+
- Polling can be enabled or disabled by calling `startIncomingTransactionPolling` or `stopIncomingTransactionPolling` respectively
|
|
246
|
+
- An immediate update can be requested by calling `updateIncomingTransactions`
|
|
247
|
+
- The new constructor parameter `incomingTransactions.isEnabled` acts as an override to disable this functionality based on a client preference for example
|
|
248
|
+
- **BREAKING**: Remove `prepareUnsignedEthTx` and `getCommonConfiguration` methods ([#1581](https://github.com/MetaMask/core/pull/1581))
|
|
249
|
+
- These methods were intended mainly for internal use, so it's likely this change doesn't affect most projects
|
|
250
|
+
|
|
251
|
+
## [8.0.1]
|
|
252
|
+
### Changed
|
|
253
|
+
- Replace `eth-query` ^2.1.2 with `@metamask/eth-query` ^3.0.1 ([#1546](https://github.com/MetaMask/core/pull/1546))
|
|
254
|
+
|
|
255
|
+
## [8.0.0]
|
|
256
|
+
### Changed
|
|
257
|
+
- **BREAKING**: Change `babel-runtime` from a `dependency` to a `peerDependency` ([#1504](https://github.com/MetaMask/core/pull/1504))
|
|
258
|
+
- Update `@metamask/utils` to `^6.2.0` ([#1514](https://github.com/MetaMask/core/pull/1514))
|
|
259
|
+
|
|
260
|
+
## [7.1.0]
|
|
261
|
+
### Added
|
|
262
|
+
- Expose `HARDFORK` constant ([#1423](https://github.com/MetaMask/core/pull/1423))
|
|
263
|
+
- Add support for transactions on Linea networks ([#1423](https://github.com/MetaMask/core/pull/1423))
|
|
264
|
+
|
|
265
|
+
## [7.0.0]
|
|
266
|
+
### Changed
|
|
267
|
+
- **BREAKING**: Change the approveTransaction and cancelTransaction methods to private ([#1435](https://github.com/MetaMask/core/pull/1435))
|
|
268
|
+
- Consumers should migrate from use of these methods to use of `processApproval`.
|
|
269
|
+
- Update the TransactionController to await the approval request promise before automatically performing the relevant logic, either signing and submitting the transaction, or cancelling it ([#1435](https://github.com/MetaMask/core/pull/1435))
|
|
270
|
+
|
|
271
|
+
## [6.1.0]
|
|
272
|
+
### Changed
|
|
273
|
+
- Relax types of `provider` and `blockTracker` options ([#1443](https://github.com/MetaMask/core/pull/1443))
|
|
274
|
+
- The types used to require proxy versions of Provider and BlockTracker. Now they just require the non-proxy versions, which are a strict subset of the proxied versions.
|
|
275
|
+
|
|
276
|
+
## [6.0.0]
|
|
277
|
+
### Added
|
|
278
|
+
- Update transaction controller to automatically initiate, finalize, and cancel approval requests as transactions move through states ([#1241](https://github.com/MetaMask/core/pull/1241))
|
|
279
|
+
- The `ApprovalController:addRequest` action will be called when a new transaction is initiated
|
|
280
|
+
- The `ApprovalController:rejectRequest` action will be called if a transaction fails
|
|
281
|
+
- The `ApprovalController:acceptRequest` action will be called when a transaction is approved
|
|
282
|
+
|
|
283
|
+
### Changed
|
|
284
|
+
- **BREAKING:** Bump to Node 16 ([#1262](https://github.com/MetaMask/core/pull/1262))
|
|
285
|
+
- **BREAKING:** Update `@metamask/network-controller` dependency and peer dependency ([#1367](https://github.com/MetaMask/core/pull/1367))
|
|
286
|
+
- This affects the `getNetworkState` and `onNetworkStateChange` constructor parameters
|
|
287
|
+
- **BREAKING:** Change format of chain ID in state to `Hex` ([#1367](https://github.com/MetaMask/core/pull/1367))
|
|
288
|
+
- The `chainId` property of the `Transaction` type has been changed from `number` to `Hex`
|
|
289
|
+
- The `chainId` property of the `TransactionMeta` type has been changed from a decimal `string` to `Hex`, and the `transaction` property has been updated along with the `Transaction` type (as described above).
|
|
290
|
+
- The state property `transactions` is an array of `TransactionMeta` objects, so it has changed according to the description above.
|
|
291
|
+
- This requires a state migration: each entry should have the `chainId` property converted from a decimal `string` to `Hex`, and the `transaction.chainId` property changed from `number` to `Hex`.
|
|
292
|
+
- The `addTransaction` and `estimateGas` methods now expect the first parameter (`transaction`) to use type `Hex` for the `chainId` property.
|
|
293
|
+
- The `updateTransaction` method now expects the `transactionMeta` parameter to use type `Hex` for the `chainId` property (and for the nested `transaction.chainId` property)
|
|
294
|
+
- **BREAKING:** Add `messenger` as required constructor parameter ([#1241](https://github.com/MetaMask/core/pull/1241))
|
|
295
|
+
- **BREAKING:** Add `@metamask/approval-controller` as a dependency and peer dependency ([#1241](https://github.com/MetaMask/core/pull/1241), [#1393](https://github.com/MetaMask/core/pull/1393))
|
|
296
|
+
- Add `@metamask/utils` dependency ([#1367](https://github.com/MetaMask/core/pull/1367))
|
|
297
|
+
|
|
298
|
+
### Fixed
|
|
299
|
+
- Fix inaccurate hard-coded `chainId` on incoming token transactions ([#1366](https://github.com/MetaMask/core/pull/1366))
|
|
300
|
+
|
|
301
|
+
## [5.0.0]
|
|
302
|
+
### Changed
|
|
303
|
+
- **BREAKING**: peerDeps: @metamask/network-controller@6.0.0->8.0.0 ([#1196](https://github.com/MetaMask/core/pull/1196))
|
|
304
|
+
- deps: eth-rpc-errors@4.0.0->4.0.2 ([#1215](https://github.com/MetaMask/core/pull/1215))
|
|
305
|
+
- Add nonce tracker to transactions controller ([#1147](https://github.com/MetaMask/core/pull/1147))
|
|
306
|
+
- Previously this controller would get the next nonce by calling `eth_getTransactionCount` with a block reference of `pending`. The next nonce would then be returned from our middleware (within `web3-provider-engine`).
|
|
307
|
+
- Instead we're now using the nonce tracker to get the next nonce, dropping our reliance on this `eth_getTransactionCount` middleware. This will let us drop that middleware in a future update without impacting the transaction controller.
|
|
308
|
+
- This should result in no functional changes, except that the nonce middleware is no longer required.
|
|
309
|
+
|
|
310
|
+
## [4.0.1]
|
|
311
|
+
### Changed
|
|
312
|
+
- Use `NetworkType` enum for chain configuration ([#1132](https://github.com/MetaMask/core/pull/1132))
|
|
313
|
+
|
|
314
|
+
## [4.0.0]
|
|
315
|
+
### Removed
|
|
316
|
+
- **BREAKING:** Remove `isomorphic-fetch` ([#1106](https://github.com/MetaMask/controllers/pull/1106))
|
|
317
|
+
- Consumers must now import `isomorphic-fetch` or another polyfill themselves if they are running in an environment without `fetch`
|
|
318
|
+
|
|
319
|
+
## [3.0.0]
|
|
320
|
+
### Added
|
|
321
|
+
- Add Etherscan API support for Sepolia and Goerli ([#1041](https://github.com/MetaMask/controllers/pull/1041))
|
|
322
|
+
- Export `isEIP1559Transaction` function from package ([#1058](https://github.com/MetaMask/controllers/pull/1058))
|
|
323
|
+
|
|
324
|
+
### Changed
|
|
325
|
+
- **BREAKING**: Drop Etherscan API support for Ropsten, Rinkeby, and Kovan ([#1041](https://github.com/MetaMask/controllers/pull/1041))
|
|
326
|
+
- Rename this repository to `core` ([#1031](https://github.com/MetaMask/controllers/pull/1031))
|
|
327
|
+
- Update `@metamask/controller-utils` package ([#1041](https://github.com/MetaMask/controllers/pull/1041))
|
|
328
|
+
|
|
329
|
+
## [2.0.0]
|
|
330
|
+
### Changed
|
|
331
|
+
- **BREAKING:** Update `getNetworkState` constructor option to take an object with `providerConfig` property rather than `providerConfig` ([#995](https://github.com/MetaMask/core/pull/995))
|
|
332
|
+
- Relax dependency on `@metamask/base-controller`, `@metamask/controller-utils`, and `@metamask/network-controller` (use `^` instead of `~`) ([#998](https://github.com/MetaMask/core/pull/998))
|
|
333
|
+
|
|
334
|
+
## [1.0.0]
|
|
335
|
+
### Added
|
|
336
|
+
- Initial release
|
|
337
|
+
- As a result of converting our shared controllers repo into a monorepo ([#831](https://github.com/MetaMask/core/pull/831)), we've created this package from select parts of [`@metamask/controllers` v33.0.0](https://github.com/MetaMask/core/tree/v33.0.0), namely:
|
|
338
|
+
- Everything in `src/transaction`
|
|
339
|
+
- Transaction-related functions from `src/util.ts` and accompanying tests
|
|
340
|
+
|
|
341
|
+
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
342
|
+
|
|
343
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@18.3.1...HEAD
|
|
344
|
+
[18.3.1]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@18.3.0...@metamask/transaction-controller@18.3.1
|
|
345
|
+
[18.3.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@18.2.0...@metamask/transaction-controller@18.3.0
|
|
346
|
+
[18.2.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@18.1.0...@metamask/transaction-controller@18.2.0
|
|
347
|
+
[18.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@18.0.0...@metamask/transaction-controller@18.1.0
|
|
348
|
+
[18.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@17.0.0...@metamask/transaction-controller@18.0.0
|
|
349
|
+
[17.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@16.0.0...@metamask/transaction-controller@17.0.0
|
|
350
|
+
[16.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@15.0.0...@metamask/transaction-controller@16.0.0
|
|
351
|
+
[15.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@14.0.0...@metamask/transaction-controller@15.0.0
|
|
352
|
+
[14.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@13.0.0...@metamask/transaction-controller@14.0.0
|
|
353
|
+
[13.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@12.0.0...@metamask/transaction-controller@13.0.0
|
|
354
|
+
[12.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@11.1.0...@metamask/transaction-controller@12.0.0
|
|
355
|
+
[11.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@11.0.0...@metamask/transaction-controller@11.1.0
|
|
356
|
+
[11.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@10.0.0...@metamask/transaction-controller@11.0.0
|
|
357
|
+
[10.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@9.2.0...@metamask/transaction-controller@10.0.0
|
|
358
|
+
[9.2.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@9.1.0...@metamask/transaction-controller@9.2.0
|
|
359
|
+
[9.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@9.0.0...@metamask/transaction-controller@9.1.0
|
|
360
|
+
[9.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@8.0.1...@metamask/transaction-controller@9.0.0
|
|
361
|
+
[8.0.1]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@8.0.0...@metamask/transaction-controller@8.0.1
|
|
362
|
+
[8.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@7.1.0...@metamask/transaction-controller@8.0.0
|
|
363
|
+
[7.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@7.0.0...@metamask/transaction-controller@7.1.0
|
|
364
|
+
[7.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@6.1.0...@metamask/transaction-controller@7.0.0
|
|
365
|
+
[6.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@6.0.0...@metamask/transaction-controller@6.1.0
|
|
366
|
+
[6.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@5.0.0...@metamask/transaction-controller@6.0.0
|
|
367
|
+
[5.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@4.0.1...@metamask/transaction-controller@5.0.0
|
|
368
|
+
[4.0.1]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@4.0.0...@metamask/transaction-controller@4.0.1
|
|
369
|
+
[4.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@3.0.0...@metamask/transaction-controller@4.0.0
|
|
370
|
+
[3.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@2.0.0...@metamask/transaction-controller@3.0.0
|
|
371
|
+
[2.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@1.0.0...@metamask/transaction-controller@2.0.0
|
|
372
|
+
[1.0.0]: https://github.com/MetaMask/core/releases/tag/@metamask/transaction-controller@1.0.0
|
|
@@ -8,7 +8,7 @@ import type { GasFeeState } from '@metamask/gas-fee-controller';
|
|
|
8
8
|
import type { BlockTracker, NetworkState, Provider } from '@metamask/network-controller';
|
|
9
9
|
import type { Hex } from '@metamask/utils';
|
|
10
10
|
import { EventEmitter } from 'events';
|
|
11
|
-
import type { NonceLock } from 'nonce-tracker';
|
|
11
|
+
import type { NonceLock, Transaction as NonceTrackerTransaction } from 'nonce-tracker';
|
|
12
12
|
import type { Events, SavedGasFees, SecurityProviderRequest, SendFlowHistoryEntry, TransactionParams, TransactionMeta, TransactionReceipt, WalletDevice, SecurityAlertResponse } from './types';
|
|
13
13
|
import { TransactionType, TransactionStatus } from './types';
|
|
14
14
|
export declare const HARDFORK = Hardfork.London;
|
|
@@ -94,13 +94,13 @@ export interface TransactionControllerEventEmitter extends EventEmitter {
|
|
|
94
94
|
* Controller responsible for submitting and managing transactions.
|
|
95
95
|
*/
|
|
96
96
|
export declare class TransactionController extends BaseControllerV1<TransactionConfig, TransactionState> {
|
|
97
|
-
private ethQuery;
|
|
97
|
+
private readonly ethQuery;
|
|
98
98
|
private readonly isHistoryDisabled;
|
|
99
99
|
private readonly isSwapsDisabled;
|
|
100
100
|
private readonly isSendFlowHistoryDisabled;
|
|
101
101
|
private readonly inProcessOfSigning;
|
|
102
102
|
private readonly nonceTracker;
|
|
103
|
-
private registry;
|
|
103
|
+
private readonly registry;
|
|
104
104
|
private readonly provider;
|
|
105
105
|
private readonly mutex;
|
|
106
106
|
private readonly getSavedGasFees;
|
|
@@ -110,6 +110,7 @@ export declare class TransactionController extends BaseControllerV1<TransactionC
|
|
|
110
110
|
private readonly getGasFeeEstimates;
|
|
111
111
|
private readonly getPermittedAccounts;
|
|
112
112
|
private readonly getSelectedAddress;
|
|
113
|
+
private readonly getExternalPendingTransactions;
|
|
113
114
|
private readonly messagingSystem;
|
|
114
115
|
private readonly incomingTransactionHelper;
|
|
115
116
|
private readonly securityProviderRequest?;
|
|
@@ -144,12 +145,13 @@ export declare class TransactionController extends BaseControllerV1<TransactionC
|
|
|
144
145
|
* @param options.disableHistory - Whether to disable storing history in transaction metadata.
|
|
145
146
|
* @param options.disableSendFlowHistory - Explicitly disable transaction metadata history.
|
|
146
147
|
* @param options.disableSwaps - Whether to disable additional processing on swaps transactions.
|
|
147
|
-
* @param options.getSavedGasFees - Gets the saved gas fee config.
|
|
148
148
|
* @param options.getCurrentAccountEIP1559Compatibility - Whether or not the account supports EIP-1559.
|
|
149
149
|
* @param options.getCurrentNetworkEIP1559Compatibility - Whether or not the network supports EIP-1559.
|
|
150
|
+
* @param options.getExternalPendingTransactions - Callback to retrieve pending transactions from external sources.
|
|
150
151
|
* @param options.getGasFeeEstimates - Callback to retrieve gas fee estimates.
|
|
151
152
|
* @param options.getNetworkState - Gets the state of the network controller.
|
|
152
153
|
* @param options.getPermittedAccounts - Get accounts that a given origin has permissions for.
|
|
154
|
+
* @param options.getSavedGasFees - Gets the saved gas fee config.
|
|
153
155
|
* @param options.getSelectedAddress - Gets the address of the currently selected account.
|
|
154
156
|
* @param options.incomingTransactions - Configuration options for incoming transaction support.
|
|
155
157
|
* @param options.incomingTransactions.includeTokenTransfers - Whether or not to include ERC20 token transfers.
|
|
@@ -172,18 +174,19 @@ export declare class TransactionController extends BaseControllerV1<TransactionC
|
|
|
172
174
|
* @param config - Initial options used to configure this controller.
|
|
173
175
|
* @param state - Initial state to set on this controller.
|
|
174
176
|
*/
|
|
175
|
-
constructor({ blockTracker, cancelMultiplier, disableHistory, disableSendFlowHistory, disableSwaps,
|
|
177
|
+
constructor({ blockTracker, cancelMultiplier, disableHistory, disableSendFlowHistory, disableSwaps, getCurrentAccountEIP1559Compatibility, getCurrentNetworkEIP1559Compatibility, getExternalPendingTransactions, getGasFeeEstimates, getNetworkState, getPermittedAccounts, getSavedGasFees, getSelectedAddress, incomingTransactions, messenger, onNetworkStateChange, pendingTransactions, provider, securityProviderRequest, speedUpMultiplier, hooks, }: {
|
|
176
178
|
blockTracker: BlockTracker;
|
|
177
179
|
cancelMultiplier?: number;
|
|
178
180
|
disableHistory: boolean;
|
|
179
181
|
disableSendFlowHistory: boolean;
|
|
180
182
|
disableSwaps: boolean;
|
|
181
|
-
getSavedGasFees?: (chainId: Hex) => SavedGasFees | undefined;
|
|
182
183
|
getCurrentAccountEIP1559Compatibility?: () => Promise<boolean>;
|
|
183
184
|
getCurrentNetworkEIP1559Compatibility: () => Promise<boolean>;
|
|
185
|
+
getExternalPendingTransactions?: (address: string) => NonceTrackerTransaction[];
|
|
184
186
|
getGasFeeEstimates?: () => Promise<GasFeeState>;
|
|
185
187
|
getNetworkState: () => NetworkState;
|
|
186
188
|
getPermittedAccounts: (origin?: string) => Promise<string[]>;
|
|
189
|
+
getSavedGasFees?: (chainId: Hex) => SavedGasFees | undefined;
|
|
187
190
|
getSelectedAddress: () => string;
|
|
188
191
|
incomingTransactions?: {
|
|
189
192
|
includeTokenTransfers?: boolean;
|
|
@@ -479,10 +482,6 @@ export declare class TransactionController extends BaseControllerV1<TransactionC
|
|
|
479
482
|
private updateGasProperties;
|
|
480
483
|
private getCurrentChainTransactionsByStatus;
|
|
481
484
|
private onBootCleanup;
|
|
482
|
-
/**
|
|
483
|
-
* Create approvals for all unapproved transactions on current chain.
|
|
484
|
-
*/
|
|
485
|
-
private createApprovalsForUnapprovedTransactions;
|
|
486
485
|
/**
|
|
487
486
|
* Force to submit approved transactions on current chain.
|
|
488
487
|
*/
|
|
@@ -593,6 +592,7 @@ export declare class TransactionController extends BaseControllerV1<TransactionC
|
|
|
593
592
|
private addPendingTransactionTrackerListeners;
|
|
594
593
|
private signTransaction;
|
|
595
594
|
private onTransactionStatusChange;
|
|
595
|
+
private getNonceTrackerPendingTransactions;
|
|
596
596
|
private getNonceTrackerTransactions;
|
|
597
597
|
private onConfirmedTransaction;
|
|
598
598
|
private updatePostBalance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionController.d.ts","sourceRoot":"","sources":["../src/TransactionController.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAA4B,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAU7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAI3C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"TransactionController.d.ts","sourceRoot":"","sources":["../src/TransactionController.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAA4B,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC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