@metamask-previews/transaction-controller 21.0.0-preview.8cdddaf → 21.0.1-preview.56c80981

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +100 -5
  2. package/dist/TransactionController.d.ts +85 -30
  3. package/dist/TransactionController.d.ts.map +1 -1
  4. package/dist/TransactionController.js +441 -108
  5. package/dist/TransactionController.js.map +1 -1
  6. package/dist/helpers/EtherscanRemoteTransactionSource.d.ts.map +1 -1
  7. package/dist/helpers/EtherscanRemoteTransactionSource.js +28 -8
  8. package/dist/helpers/EtherscanRemoteTransactionSource.js.map +1 -1
  9. package/dist/helpers/IncomingTransactionHelper.d.ts +3 -3
  10. package/dist/helpers/IncomingTransactionHelper.d.ts.map +1 -1
  11. package/dist/helpers/IncomingTransactionHelper.js +17 -14
  12. package/dist/helpers/IncomingTransactionHelper.js.map +1 -1
  13. package/dist/helpers/PendingTransactionTracker.d.ts +7 -7
  14. package/dist/helpers/PendingTransactionTracker.d.ts.map +1 -1
  15. package/dist/helpers/PendingTransactionTracker.js +26 -26
  16. package/dist/helpers/PendingTransactionTracker.js.map +1 -1
  17. package/dist/types.d.ts +8 -0
  18. package/dist/types.d.ts.map +1 -1
  19. package/dist/types.js.map +1 -1
  20. package/dist/utils/etherscan.d.ts +7 -0
  21. package/dist/utils/etherscan.d.ts.map +1 -1
  22. package/dist/utils/etherscan.js +16 -6
  23. package/dist/utils/etherscan.js.map +1 -1
  24. package/dist/utils/gas-fees.d.ts +4 -3
  25. package/dist/utils/gas-fees.d.ts.map +1 -1
  26. package/dist/utils/gas-fees.js +6 -2
  27. package/dist/utils/gas-fees.js.map +1 -1
  28. package/dist/utils/gas.d.ts +3 -2
  29. package/dist/utils/gas.d.ts.map +1 -1
  30. package/dist/utils/gas.js +4 -5
  31. package/dist/utils/gas.js.map +1 -1
  32. package/dist/utils/nonce.d.ts +3 -3
  33. package/dist/utils/nonce.d.ts.map +1 -1
  34. package/dist/utils/nonce.js +3 -3
  35. package/dist/utils/nonce.js.map +1 -1
  36. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -6,8 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
7
 
7
8
  ## [Unreleased]
8
9
 
10
+ ## [21.0.1]
11
+
12
+ ### Fixed
13
+
14
+ - Resolves transaction custodian promise when setting transaction status to `submitted` or `failed` ([#3845](https://github.com/MetaMask/core/pull/3845))
15
+ - Fix normalizer ensuring property `type` is always present in `TransactionParams` ([#3817](https://github.com/MetaMask/core/pull/3817))
16
+
9
17
  ## [21.0.0]
18
+
10
19
  ### Changed
20
+
11
21
  - **BREAKING:** Bump `@metamask/approval-controller` peer dependency to `^5.1.2` ([#3821](https://github.com/MetaMask/core/pull/3821))
12
22
  - **BREAKING:** Bump `@metamask/gas-fee-controller` peer dependency to `^13.0.0` ([#3821](https://github.com/MetaMask/core/pull/3821))
13
23
  - **BREAKING:** Bump `@metamask/network-controller` peer dependency to `^17.2.0` ([#3821](https://github.com/MetaMask/core/pull/3821))
@@ -15,18 +25,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
25
  - Bump `@metamask/controller-utils` to `^8.0.2` ([#3821](https://github.com/MetaMask/core/pull/3821))
16
26
 
17
27
  ## [20.0.0]
28
+
18
29
  ### Changed
30
+
19
31
  - **BREAKING:** Change type of `destinationTokenDecimals` property in `TransactionMeta` to `number` ([#3749](https://github.com/MetaMask/core/pull/3749))
20
32
 
21
33
  ### Fixed
34
+
22
35
  - Handle missing current account in incoming transactions ([#3741](https://github.com/MetaMask/core/pull/3741))
23
36
 
24
37
  ## [19.0.1]
38
+
25
39
  ### Changed
40
+
26
41
  - Bump `eth-method-registry` from `^1.1.0` to `^3.0.0` ([#3688](https://github.com/MetaMask/core/pull/3688))
27
42
 
28
43
  ## [19.0.0]
44
+
29
45
  ### Changed
46
+
30
47
  - **BREAKING:** Bump `@metamask/approval-controller` dependency and peer dependency from `^5.1.0` to `^5.1.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
31
48
  - **BREAKING:** Bump `@metamask/gas-fee-controller` dependency and peer dependency from `^11.0.0` to `^12.0.0` ([#3695](https://github.com/MetaMask/core/pull/3695))
32
49
  - **BREAKING:** Bump `@metamask/network-controller` dependency and peer dependency from `^17.0.0` to `^17.1.0` ([#3695](https://github.com/MetaMask/core/pull/3695))
@@ -34,10 +51,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
34
51
  - Bump `@metamask/controller-utils` to `^8.0.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
35
52
 
36
53
  ### Fixed
54
+
37
55
  - Use estimate gas instead of fixed gas (21k) when a contract is deployed and the gas is not specified ([#3694](https://github.com/MetaMask/core/pull/3694))
38
56
 
39
57
  ## [18.3.1]
58
+
40
59
  ### Fixed
60
+
41
61
  - Fix incorrect transaction statuses ([#3676](https://github.com/MetaMask/core/pull/3676))
42
62
  - Fix `dropped` status detection by ignoring transactions on other chains.
43
63
  - Start polling if network changes and associated transactions are pending.
@@ -46,32 +66,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
46
66
  - Fix incoming transactions on Linea Goerli ([#3674](https://github.com/MetaMask/core/pull/3674))
47
67
 
48
68
  ## [18.3.0]
69
+
49
70
  ### Added
71
+
50
72
  - Add optional `getExternalPendingTransactions` callback argument to constructor ([#3587](https://github.com/MetaMask/core/pull/3587))
51
73
 
52
74
  ## [18.2.0]
75
+
53
76
  ### Added
77
+
54
78
  - Add the `customNonceValue` property to the transaction metadata ([#3579](https://github.com/MetaMask/core/pull/3579))
55
79
 
56
80
  ### Changed
57
- - Update transaction metadata after approval if the approval result includes the `value.txMeta` property ([#3579](https://github.com/MetaMask/core/pull/3579))
81
+
82
+ - Update transaction metadata after approval if the approval result includes the `value.txMeta` property ([#3579](https://github.com/MetaMask/core/pull/3579))
58
83
  - Add `type` property to all incoming transactions ([#3579](https://github.com/MetaMask/core/pull/3579))
59
84
 
60
85
  ## [18.1.0]
86
+
61
87
  ### Added
88
+
62
89
  - 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))
63
90
 
64
91
  ### Changed
92
+
65
93
  - Populate the `preTxBalance` property before publishing transactions with the `swap` type ([#2678](https://github.com/MetaMask/core/pull/2678))
66
94
  - Change the status of transactions with matching nonces to `dropped` when confirming a transaction ([#2678](https://github.com/MetaMask/core/pull/2678))
67
95
 
68
96
  ## [18.0.0]
97
+
69
98
  ### Added
99
+
70
100
  - Add `updateEditableParams` method ([#2056](https://github.com/MetaMask/core/pull/2056))
71
101
  - Add `initApprovals` method to trigger the approval flow for any pending transactions during initialisation ([#2056](https://github.com/MetaMask/core/pull/2056))
72
102
  - Add `getTransactions` method to search transactions using the given criteria and options ([#2056](https://github.com/MetaMask/core/pull/2056))
73
103
 
74
104
  ### Changed
105
+
75
106
  - **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
76
107
  - This is breaking because the type of the `messenger` has backward-incompatible changes. See the changelog for this package for more.
77
108
  - **BREAKING:** Add `finished` and `publish-skip` events to `Events` type
@@ -89,7 +120,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
89
120
  - Bump `@metamask/network-controller` to ^17.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
90
121
 
91
122
  ## [17.0.0]
123
+
92
124
  ### Added
125
+
93
126
  - **BREAKING:** Add additional support swaps support ([#1877](https://github.com/MetaMask/core/pull/1877))
94
127
  - Swap transaction updates can be prevented by setting `disableSwaps` as `true`. If not set it will default to `false`.
95
128
  - If `disableSwaps` is `false` or not set, then the `createSwapsTransaction` callback MUST be defined.
@@ -116,6 +149,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
116
149
  - Populate the `firstRetryBlockNumber`, `retryCount`, and `warning` properties in the transaction metadata. ([#1896](https://github.com/MetaMask/core/pull/1896))
117
150
 
118
151
  ### Changed
152
+
119
153
  - **BREAKING:** Pending transactions are now automatically resubmitted. ([#1896](https://github.com/MetaMask/core/pull/1896))
120
154
  - This can be disabled by setting the new `pendingTransactions.isResubmitEnabled` constructor option to `false`.
121
155
  - **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^16.0.0
@@ -129,18 +163,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
129
163
  - Bump @metamask/utils from 8.1.0 to 8.2.0 ([#1957](https://github.com/MetaMask/core/pull/1957))
130
164
 
131
165
  ## [16.0.0]
166
+
132
167
  ### Changed
168
+
133
169
  - **BREAKING:** Bump dependency and peer dependency on `@metamask/gas-fee-controller` to ^10.0.0
134
170
  - Bump dependency and peer dependency on `@metamask/network-controller` to ^15.1.0
135
171
 
136
172
  ## [15.0.0]
173
+
137
174
  ### Changed
175
+
138
176
  - **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^15.0.0
139
177
  - Bump dependency on `@metamask/rpc-errors` to ^6.1.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
140
178
  - Bump dependency and peer dependency on `@metamask/approval-controller` to ^4.0.1
141
179
 
142
180
  ## [14.0.0]
181
+
143
182
  ### Added
183
+
144
184
  - **BREAKING:** Add required `getPermittedAccounts` argument to constructor, used to validate `from` addresses ([#1722](https://github.com/MetaMask/core/pull/1722))
145
185
  - Add `securityProviderRequest` option to constructor ([#1725](https://github.com/MetaMask/core/pull/1725))
146
186
  - Add `method` option to `addTransaction` method ([#1725](https://github.com/MetaMask/core/pull/1725))
@@ -151,6 +191,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
151
191
  - Update `addTransaction` to ensure allowed `from` address when `origin` is specified ([#1722](https://github.com/MetaMask/core/pull/1722))
152
192
 
153
193
  ### Changed
194
+
154
195
  - Bump dependency on `@metamask/utils` to ^8.1.0 ([#1639](https://github.com/MetaMask/core/pull/1639))
155
196
  - Bump dependency and peer dependency on `@metamask/approval-controller` to ^4.0.0
156
197
  - Bump dependency on `@metamask/base-controller` to ^3.2.3
@@ -158,6 +199,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
158
199
  - Bump dependency and peer dependency on `@metamask/network-controller` to ^14.0.0
159
200
 
160
201
  ### Removed
202
+
161
203
  - **BREAKING:** Remove `interval` config option ([#1746](https://github.com/MetaMask/core/pull/1746))
162
204
  - The block tracker (which has its own interval) is now used to poll for pending transactions instead.
163
205
  - **BREAKING:** Remove `poll` method ([#1746](https://github.com/MetaMask/core/pull/1746))
@@ -166,15 +208,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
166
208
  - This functionality has been moved to a private interface and there is no way to use it externally.
167
209
 
168
210
  ## [13.0.0]
211
+
169
212
  ### Changed
170
- - **BREAKING**: Add required `getCurrentAccountEIP1559Compatibility` and `getCurrentNetworkEIP1559Compatibility` callback arguments to constructor ([#1693](https://github.com/MetaMask/core/pull/1693))
213
+
214
+ - **BREAKING**: Add required `getCurrentAccountEIP1559Compatibility` and `getCurrentNetworkEIP1559Compatibility` callback arguments to constructor ([#1693](https://github.com/MetaMask/core/pull/1693))
171
215
  - Update `validateTxParams` to throw standardised errors using the `@metamask/rpc-errors` package ([#1690](https://github.com/MetaMask/core/pull/1690))
172
216
  - The dependency `eth-rpc-errors` has been replaced by `@metamask/rpc-errors`
173
217
  - Preserve `type` transaction parameter for legacy transactions ([#1713](https://github.com/MetaMask/core/pull/1713))
174
218
  - Update TypeScript to v4.8.x ([#1718](https://github.com/MetaMask/core/pull/1718))
175
219
 
176
220
  ## [12.0.0]
221
+
177
222
  ### Changed
223
+
178
224
  - **BREAKING**: Use only `chainId` to determine if a transaction belongs to the current network ([#1633](https://github.com/MetaMask/core/pull/1633))
179
225
  - No longer uses `networkID` as a fallback if `chainId` is missing
180
226
  - **BREAKING**: Change `TransactionMeta.chainId` to be required ([#1633](https://github.com/MetaMask/core/pull/1633))
@@ -184,24 +230,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
184
230
  - Bump dependency on `@metamask/controller-utils` to ^5.0.0 ([#1633](https://github.com/MetaMask/core/pull/1633))
185
231
 
186
232
  ### Removed
233
+
187
234
  - Remove `networkId` param from `RemoteTransactionSource.isSupportedNetwork()` interface ([#1633](https://github.com/MetaMask/core/pull/1633))
188
235
  - Remove `currentNetworkId` property from `RemoteTransactionSourceRequest` ([#1633](https://github.com/MetaMask/core/pull/1633))
189
236
 
190
237
  ## [11.1.0]
238
+
191
239
  ### Added
240
+
192
241
  - Add `type` property to the transaction metadata ([#1670](https://github.com/MetaMask/core/pull/1670))
193
242
 
194
243
  ## [11.0.0]
244
+
195
245
  ### Added
246
+
196
247
  - Add optional `getLastBlockVariations` method to `RemoteTransactionSource` type ([#1668](https://github.com/MetaMask/core/pull/1668))
197
248
  - Add `updateTransactionGasFees` method to `TransactionController` ([#1674](https://github.com/MetaMask/core/pull/1674))
198
- - Add `r`, `s` and `v` properties to the transaction metadata ([#1664](https://github.com/MetaMask/core/pull/1664))
249
+ - Add `r`, `s` and `v` properties to the transaction metadata ([#1664](https://github.com/MetaMask/core/pull/1664))
199
250
  - Add `sendFlowHistory` property to the transaction metadata ([#1665](https://github.com/MetaMask/core/pull/1665))
200
251
  - Add `updateTransactionSendFlowHistory` method to `TransactionController` ([#1665](https://github.com/MetaMask/core/pull/1665))
201
252
  - Add `originalGasEstimate` property to the transaction metadata ([#1656](https://github.com/MetaMask/core/pull/1656))
202
253
  - Add `incomingTransactions.queryEntireHistory` constructor option ([#1652](https://github.com/MetaMask/core/pull/1652))
203
254
 
204
255
  ### Changed
256
+
205
257
  - **BREAKING**: Remove `apiKey` property from `RemoteTransactionSourceRequest` type ([#1668](https://github.com/MetaMask/core/pull/1668))
206
258
  - **BREAKING**: Remove unused `FetchAllOptions` type from `TransactionController` ([#1668](https://github.com/MetaMask/core/pull/1668))
207
259
  - **BREAKING**: Remove `incomingTransactions.apiKey` constructor option ([#1668](https://github.com/MetaMask/core/pull/1668))
@@ -213,36 +265,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
213
265
  - **BREAKING**: Rename the `transactionHash` property to `hash` in the transaction metadata
214
266
 
215
267
  ### Fixed
268
+
216
269
  - Fix the sorting of incoming and updated transactions ([#1652](https://github.com/MetaMask/core/pull/1652))
217
270
  - 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))
218
271
 
219
272
  ## [10.0.0]
273
+
220
274
  ### Added
275
+
221
276
  - Add `submittedTime` to the transaction metadata ([#1645](https://github.com/MetaMask/core/pull/1645))
222
277
  - Add optional `actionId` argument to `addTransaction` and `speedUpTransaction` to prevent duplicate requests ([#1582](https://github.com/MetaMask/core/pull/1582))
223
278
  - Add `confirmExternalTransaction` method ([#1625](https://github.com/MetaMask/core/pull/1625))
224
279
 
225
280
  ### Changed
281
+
226
282
  - **BREAKING**: Rename `rawTransaction` to `rawTx` in the transaction metadata ([#1624](https://github.com/MetaMask/core/pull/1624))
227
283
 
228
284
  ## [9.2.0]
285
+
229
286
  ### Added
287
+
230
288
  - Persist `estimatedBaseFee` in `stopTransaction` and `speedUpTransaction` ([#1621](https://github.com/MetaMask/core/pull/1621))
231
289
  - Add `securityAlertResponse` to `addTransaction` `opts` argument ([#1636](https://github.com/MetaMask/core/pull/1636))
232
290
 
233
291
  ## [9.1.0]
292
+
234
293
  ### Added
294
+
235
295
  - Add `blockTimestamp` to `TransactionMetaBase` type ([#1616](https://github.com/MetaMask/core/pull/1616))
236
296
  - Update `queryTransactionStatuses` to populate `blockTimestamp` on each transaction when it is verified ([#1616](https://github.com/MetaMask/core/pull/1616))
237
297
 
238
298
  ### Changed
299
+
239
300
  - Bump dependency and peer dependency on `@metamask/approval-controller` to ^3.5.1
240
301
  - Bump dependency on `@metamask/base-controller` to ^3.2.1
241
302
  - Bump dependency on `@metamask/controller-utils` to ^4.3.2
242
303
  - Bump dependency and peer dependency on `@metamask/network-controller` to ^12.1.2
243
304
 
244
305
  ## [9.0.0]
306
+
245
307
  ### Added
308
+
246
309
  - Add `baseFeePerGas` to transaction metadata ([#1590](https://github.com/MetaMask/core/pull/1590))
247
310
  - Add `txReceipt` to transaction metadata ([#1592](https://github.com/MetaMask/core/pull/1592))
248
311
  - Add `initApprovals` method to generate approval requests from unapproved transactions ([#1575](https://github.com/MetaMask/core/pull/1575))
@@ -260,6 +323,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
260
323
  - Add `address` argument to `wipeTransactions` method ([#1573](https://github.com/MetaMask/core/pull/1573))
261
324
 
262
325
  ### Changed
326
+
263
327
  - **BREAKING**: Add required `getSelectedAddress` callback argument to constructor ([#1579](https://github.com/MetaMask/core/pull/1579))
264
328
  - **BREAKING**: Add `isSupportedNetwork` method to `RemoteTransactionSource` interface ([#1579](https://github.com/MetaMask/core/pull/1579))
265
329
  - **BREAKING**: Move all but first argument to options bag in `addTransaction` method ([#1576](https://github.com/MetaMask/core/pull/1576))
@@ -269,6 +333,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
269
333
  - This type is intended mainly for internal use, so it's likely this change doesn't affect most projects
270
334
 
271
335
  ### Removed
336
+
272
337
  - **BREAKING**: Remove `fetchAll` method ([#1579](https://github.com/MetaMask/core/pull/1579))
273
338
  - This method was used to fetch transaction history from Etherscan
274
339
  - This is now handled automatically by the controller on each new block, if polling is enabled
@@ -279,38 +344,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
279
344
  - These methods were intended mainly for internal use, so it's likely this change doesn't affect most projects
280
345
 
281
346
  ## [8.0.1]
347
+
282
348
  ### Changed
349
+
283
350
  - Replace `eth-query` ^2.1.2 with `@metamask/eth-query` ^3.0.1 ([#1546](https://github.com/MetaMask/core/pull/1546))
284
351
 
285
352
  ## [8.0.0]
353
+
286
354
  ### Changed
355
+
287
356
  - **BREAKING**: Change `babel-runtime` from a `dependency` to a `peerDependency` ([#1504](https://github.com/MetaMask/core/pull/1504))
288
357
  - Update `@metamask/utils` to `^6.2.0` ([#1514](https://github.com/MetaMask/core/pull/1514))
289
358
 
290
359
  ## [7.1.0]
360
+
291
361
  ### Added
362
+
292
363
  - Expose `HARDFORK` constant ([#1423](https://github.com/MetaMask/core/pull/1423))
293
364
  - Add support for transactions on Linea networks ([#1423](https://github.com/MetaMask/core/pull/1423))
294
365
 
295
366
  ## [7.0.0]
367
+
296
368
  ### Changed
369
+
297
370
  - **BREAKING**: Change the approveTransaction and cancelTransaction methods to private ([#1435](https://github.com/MetaMask/core/pull/1435))
298
371
  - Consumers should migrate from use of these methods to use of `processApproval`.
299
372
  - 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))
300
373
 
301
374
  ## [6.1.0]
375
+
302
376
  ### Changed
377
+
303
378
  - Relax types of `provider` and `blockTracker` options ([#1443](https://github.com/MetaMask/core/pull/1443))
304
379
  - 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.
305
380
 
306
381
  ## [6.0.0]
382
+
307
383
  ### Added
384
+
308
385
  - Update transaction controller to automatically initiate, finalize, and cancel approval requests as transactions move through states ([#1241](https://github.com/MetaMask/core/pull/1241))
309
386
  - The `ApprovalController:addRequest` action will be called when a new transaction is initiated
310
387
  - The `ApprovalController:rejectRequest` action will be called if a transaction fails
311
388
  - The `ApprovalController:acceptRequest` action will be called when a transaction is approved
312
389
 
313
390
  ### Changed
391
+
314
392
  - **BREAKING:** Bump to Node 16 ([#1262](https://github.com/MetaMask/core/pull/1262))
315
393
  - **BREAKING:** Update `@metamask/network-controller` dependency and peer dependency ([#1367](https://github.com/MetaMask/core/pull/1367))
316
394
  - This affects the `getNetworkState` and `onNetworkStateChange` constructor parameters
@@ -326,51 +404,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
326
404
  - Add `@metamask/utils` dependency ([#1367](https://github.com/MetaMask/core/pull/1367))
327
405
 
328
406
  ### Fixed
407
+
329
408
  - Fix inaccurate hard-coded `chainId` on incoming token transactions ([#1366](https://github.com/MetaMask/core/pull/1366))
330
409
 
331
410
  ## [5.0.0]
411
+
332
412
  ### Changed
413
+
333
414
  - **BREAKING**: peerDeps: @metamask/network-controller@6.0.0->8.0.0 ([#1196](https://github.com/MetaMask/core/pull/1196))
334
415
  - deps: eth-rpc-errors@4.0.0->4.0.2 ([#1215](https://github.com/MetaMask/core/pull/1215))
335
416
  - Add nonce tracker to transactions controller ([#1147](https://github.com/MetaMask/core/pull/1147))
336
- - 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`).
417
+ - 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`).
337
418
  - 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.
338
419
  - This should result in no functional changes, except that the nonce middleware is no longer required.
339
420
 
340
421
  ## [4.0.1]
422
+
341
423
  ### Changed
424
+
342
425
  - Use `NetworkType` enum for chain configuration ([#1132](https://github.com/MetaMask/core/pull/1132))
343
426
 
344
427
  ## [4.0.0]
428
+
345
429
  ### Removed
430
+
346
431
  - **BREAKING:** Remove `isomorphic-fetch` ([#1106](https://github.com/MetaMask/controllers/pull/1106))
347
432
  - Consumers must now import `isomorphic-fetch` or another polyfill themselves if they are running in an environment without `fetch`
348
433
 
349
434
  ## [3.0.0]
435
+
350
436
  ### Added
437
+
351
438
  - Add Etherscan API support for Sepolia and Goerli ([#1041](https://github.com/MetaMask/controllers/pull/1041))
352
439
  - Export `isEIP1559Transaction` function from package ([#1058](https://github.com/MetaMask/controllers/pull/1058))
353
440
 
354
441
  ### Changed
442
+
355
443
  - **BREAKING**: Drop Etherscan API support for Ropsten, Rinkeby, and Kovan ([#1041](https://github.com/MetaMask/controllers/pull/1041))
356
444
  - Rename this repository to `core` ([#1031](https://github.com/MetaMask/controllers/pull/1031))
357
445
  - Update `@metamask/controller-utils` package ([#1041](https://github.com/MetaMask/controllers/pull/1041))
358
446
 
359
447
  ## [2.0.0]
448
+
360
449
  ### Changed
450
+
361
451
  - **BREAKING:** Update `getNetworkState` constructor option to take an object with `providerConfig` property rather than `providerConfig` ([#995](https://github.com/MetaMask/core/pull/995))
362
452
  - Relax dependency on `@metamask/base-controller`, `@metamask/controller-utils`, and `@metamask/network-controller` (use `^` instead of `~`) ([#998](https://github.com/MetaMask/core/pull/998))
363
453
 
364
454
  ## [1.0.0]
455
+
365
456
  ### Added
457
+
366
458
  - Initial release
459
+
367
460
  - 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:
461
+
368
462
  - Everything in `src/transaction`
369
463
  - Transaction-related functions from `src/util.ts` and accompanying tests
370
464
 
371
465
  All changes listed after this point were applied to this package following the monorepo conversion.
372
466
 
373
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@21.0.0...HEAD
467
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@21.0.1...HEAD
468
+ [21.0.1]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@21.0.0...@metamask/transaction-controller@21.0.1
374
469
  [21.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@20.0.0...@metamask/transaction-controller@21.0.0
375
470
  [20.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@19.0.1...@metamask/transaction-controller@20.0.0
376
471
  [19.0.1]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@19.0.0...@metamask/transaction-controller@19.0.1