@metamask/transaction-controller 21.0.0 → 21.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md 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,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
7
 
7
8
  ## [Unreleased]
8
9
 
10
+ ## [21.1.0]
11
+
12
+ ### Added
13
+
14
+ - Add `abortTransactionSigning` method ([#3870](https://github.com/MetaMask/core/pull/3870))
15
+
16
+ ## [21.0.1]
17
+
18
+ ### Fixed
19
+
20
+ - Resolves transaction custodian promise when setting transaction status to `submitted` or `failed` ([#3845](https://github.com/MetaMask/core/pull/3845))
21
+ - Fix normalizer ensuring property `type` is always present in `TransactionParams` ([#3817](https://github.com/MetaMask/core/pull/3817))
22
+
9
23
  ## [21.0.0]
24
+
10
25
  ### Changed
26
+
11
27
  - **BREAKING:** Bump `@metamask/approval-controller` peer dependency to `^5.1.2` ([#3821](https://github.com/MetaMask/core/pull/3821))
12
28
  - **BREAKING:** Bump `@metamask/gas-fee-controller` peer dependency to `^13.0.0` ([#3821](https://github.com/MetaMask/core/pull/3821))
13
29
  - **BREAKING:** Bump `@metamask/network-controller` peer dependency to `^17.2.0` ([#3821](https://github.com/MetaMask/core/pull/3821))
@@ -15,18 +31,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
31
  - Bump `@metamask/controller-utils` to `^8.0.2` ([#3821](https://github.com/MetaMask/core/pull/3821))
16
32
 
17
33
  ## [20.0.0]
34
+
18
35
  ### Changed
36
+
19
37
  - **BREAKING:** Change type of `destinationTokenDecimals` property in `TransactionMeta` to `number` ([#3749](https://github.com/MetaMask/core/pull/3749))
20
38
 
21
39
  ### Fixed
40
+
22
41
  - Handle missing current account in incoming transactions ([#3741](https://github.com/MetaMask/core/pull/3741))
23
42
 
24
43
  ## [19.0.1]
44
+
25
45
  ### Changed
46
+
26
47
  - Bump `eth-method-registry` from `^1.1.0` to `^3.0.0` ([#3688](https://github.com/MetaMask/core/pull/3688))
27
48
 
28
49
  ## [19.0.0]
50
+
29
51
  ### Changed
52
+
30
53
  - **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
54
  - **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
55
  - **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 +57,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
34
57
  - Bump `@metamask/controller-utils` to `^8.0.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
35
58
 
36
59
  ### Fixed
60
+
37
61
  - 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
62
 
39
63
  ## [18.3.1]
64
+
40
65
  ### Fixed
66
+
41
67
  - Fix incorrect transaction statuses ([#3676](https://github.com/MetaMask/core/pull/3676))
42
68
  - Fix `dropped` status detection by ignoring transactions on other chains.
43
69
  - Start polling if network changes and associated transactions are pending.
@@ -46,32 +72,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
46
72
  - Fix incoming transactions on Linea Goerli ([#3674](https://github.com/MetaMask/core/pull/3674))
47
73
 
48
74
  ## [18.3.0]
75
+
49
76
  ### Added
77
+
50
78
  - Add optional `getExternalPendingTransactions` callback argument to constructor ([#3587](https://github.com/MetaMask/core/pull/3587))
51
79
 
52
80
  ## [18.2.0]
81
+
53
82
  ### Added
83
+
54
84
  - Add the `customNonceValue` property to the transaction metadata ([#3579](https://github.com/MetaMask/core/pull/3579))
55
85
 
56
86
  ### Changed
57
- - Update transaction metadata after approval if the approval result includes the `value.txMeta` property ([#3579](https://github.com/MetaMask/core/pull/3579))
87
+
88
+ - Update transaction metadata after approval if the approval result includes the `value.txMeta` property ([#3579](https://github.com/MetaMask/core/pull/3579))
58
89
  - Add `type` property to all incoming transactions ([#3579](https://github.com/MetaMask/core/pull/3579))
59
90
 
60
91
  ## [18.1.0]
92
+
61
93
  ### Added
94
+
62
95
  - 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
96
 
64
97
  ### Changed
98
+
65
99
  - Populate the `preTxBalance` property before publishing transactions with the `swap` type ([#2678](https://github.com/MetaMask/core/pull/2678))
66
100
  - Change the status of transactions with matching nonces to `dropped` when confirming a transaction ([#2678](https://github.com/MetaMask/core/pull/2678))
67
101
 
68
102
  ## [18.0.0]
103
+
69
104
  ### Added
105
+
70
106
  - Add `updateEditableParams` method ([#2056](https://github.com/MetaMask/core/pull/2056))
71
107
  - Add `initApprovals` method to trigger the approval flow for any pending transactions during initialisation ([#2056](https://github.com/MetaMask/core/pull/2056))
72
108
  - Add `getTransactions` method to search transactions using the given criteria and options ([#2056](https://github.com/MetaMask/core/pull/2056))
73
109
 
74
110
  ### Changed
111
+
75
112
  - **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
76
113
  - This is breaking because the type of the `messenger` has backward-incompatible changes. See the changelog for this package for more.
77
114
  - **BREAKING:** Add `finished` and `publish-skip` events to `Events` type
@@ -89,7 +126,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
89
126
  - Bump `@metamask/network-controller` to ^17.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
90
127
 
91
128
  ## [17.0.0]
129
+
92
130
  ### Added
131
+
93
132
  - **BREAKING:** Add additional support swaps support ([#1877](https://github.com/MetaMask/core/pull/1877))
94
133
  - Swap transaction updates can be prevented by setting `disableSwaps` as `true`. If not set it will default to `false`.
95
134
  - If `disableSwaps` is `false` or not set, then the `createSwapsTransaction` callback MUST be defined.
@@ -116,6 +155,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
116
155
  - Populate the `firstRetryBlockNumber`, `retryCount`, and `warning` properties in the transaction metadata. ([#1896](https://github.com/MetaMask/core/pull/1896))
117
156
 
118
157
  ### Changed
158
+
119
159
  - **BREAKING:** Pending transactions are now automatically resubmitted. ([#1896](https://github.com/MetaMask/core/pull/1896))
120
160
  - This can be disabled by setting the new `pendingTransactions.isResubmitEnabled` constructor option to `false`.
121
161
  - **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^16.0.0
@@ -129,18 +169,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
129
169
  - Bump @metamask/utils from 8.1.0 to 8.2.0 ([#1957](https://github.com/MetaMask/core/pull/1957))
130
170
 
131
171
  ## [16.0.0]
172
+
132
173
  ### Changed
174
+
133
175
  - **BREAKING:** Bump dependency and peer dependency on `@metamask/gas-fee-controller` to ^10.0.0
134
176
  - Bump dependency and peer dependency on `@metamask/network-controller` to ^15.1.0
135
177
 
136
178
  ## [15.0.0]
179
+
137
180
  ### Changed
181
+
138
182
  - **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^15.0.0
139
183
  - Bump dependency on `@metamask/rpc-errors` to ^6.1.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
140
184
  - Bump dependency and peer dependency on `@metamask/approval-controller` to ^4.0.1
141
185
 
142
186
  ## [14.0.0]
187
+
143
188
  ### Added
189
+
144
190
  - **BREAKING:** Add required `getPermittedAccounts` argument to constructor, used to validate `from` addresses ([#1722](https://github.com/MetaMask/core/pull/1722))
145
191
  - Add `securityProviderRequest` option to constructor ([#1725](https://github.com/MetaMask/core/pull/1725))
146
192
  - Add `method` option to `addTransaction` method ([#1725](https://github.com/MetaMask/core/pull/1725))
@@ -151,6 +197,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
151
197
  - Update `addTransaction` to ensure allowed `from` address when `origin` is specified ([#1722](https://github.com/MetaMask/core/pull/1722))
152
198
 
153
199
  ### Changed
200
+
154
201
  - Bump dependency on `@metamask/utils` to ^8.1.0 ([#1639](https://github.com/MetaMask/core/pull/1639))
155
202
  - Bump dependency and peer dependency on `@metamask/approval-controller` to ^4.0.0
156
203
  - Bump dependency on `@metamask/base-controller` to ^3.2.3
@@ -158,6 +205,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
158
205
  - Bump dependency and peer dependency on `@metamask/network-controller` to ^14.0.0
159
206
 
160
207
  ### Removed
208
+
161
209
  - **BREAKING:** Remove `interval` config option ([#1746](https://github.com/MetaMask/core/pull/1746))
162
210
  - The block tracker (which has its own interval) is now used to poll for pending transactions instead.
163
211
  - **BREAKING:** Remove `poll` method ([#1746](https://github.com/MetaMask/core/pull/1746))
@@ -166,15 +214,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
166
214
  - This functionality has been moved to a private interface and there is no way to use it externally.
167
215
 
168
216
  ## [13.0.0]
217
+
169
218
  ### Changed
170
- - **BREAKING**: Add required `getCurrentAccountEIP1559Compatibility` and `getCurrentNetworkEIP1559Compatibility` callback arguments to constructor ([#1693](https://github.com/MetaMask/core/pull/1693))
219
+
220
+ - **BREAKING**: Add required `getCurrentAccountEIP1559Compatibility` and `getCurrentNetworkEIP1559Compatibility` callback arguments to constructor ([#1693](https://github.com/MetaMask/core/pull/1693))
171
221
  - Update `validateTxParams` to throw standardised errors using the `@metamask/rpc-errors` package ([#1690](https://github.com/MetaMask/core/pull/1690))
172
222
  - The dependency `eth-rpc-errors` has been replaced by `@metamask/rpc-errors`
173
223
  - Preserve `type` transaction parameter for legacy transactions ([#1713](https://github.com/MetaMask/core/pull/1713))
174
224
  - Update TypeScript to v4.8.x ([#1718](https://github.com/MetaMask/core/pull/1718))
175
225
 
176
226
  ## [12.0.0]
227
+
177
228
  ### Changed
229
+
178
230
  - **BREAKING**: Use only `chainId` to determine if a transaction belongs to the current network ([#1633](https://github.com/MetaMask/core/pull/1633))
179
231
  - No longer uses `networkID` as a fallback if `chainId` is missing
180
232
  - **BREAKING**: Change `TransactionMeta.chainId` to be required ([#1633](https://github.com/MetaMask/core/pull/1633))
@@ -184,24 +236,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
184
236
  - Bump dependency on `@metamask/controller-utils` to ^5.0.0 ([#1633](https://github.com/MetaMask/core/pull/1633))
185
237
 
186
238
  ### Removed
239
+
187
240
  - Remove `networkId` param from `RemoteTransactionSource.isSupportedNetwork()` interface ([#1633](https://github.com/MetaMask/core/pull/1633))
188
241
  - Remove `currentNetworkId` property from `RemoteTransactionSourceRequest` ([#1633](https://github.com/MetaMask/core/pull/1633))
189
242
 
190
243
  ## [11.1.0]
244
+
191
245
  ### Added
246
+
192
247
  - Add `type` property to the transaction metadata ([#1670](https://github.com/MetaMask/core/pull/1670))
193
248
 
194
249
  ## [11.0.0]
250
+
195
251
  ### Added
252
+
196
253
  - Add optional `getLastBlockVariations` method to `RemoteTransactionSource` type ([#1668](https://github.com/MetaMask/core/pull/1668))
197
254
  - 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))
255
+ - Add `r`, `s` and `v` properties to the transaction metadata ([#1664](https://github.com/MetaMask/core/pull/1664))
199
256
  - Add `sendFlowHistory` property to the transaction metadata ([#1665](https://github.com/MetaMask/core/pull/1665))
200
257
  - Add `updateTransactionSendFlowHistory` method to `TransactionController` ([#1665](https://github.com/MetaMask/core/pull/1665))
201
258
  - Add `originalGasEstimate` property to the transaction metadata ([#1656](https://github.com/MetaMask/core/pull/1656))
202
259
  - Add `incomingTransactions.queryEntireHistory` constructor option ([#1652](https://github.com/MetaMask/core/pull/1652))
203
260
 
204
261
  ### Changed
262
+
205
263
  - **BREAKING**: Remove `apiKey` property from `RemoteTransactionSourceRequest` type ([#1668](https://github.com/MetaMask/core/pull/1668))
206
264
  - **BREAKING**: Remove unused `FetchAllOptions` type from `TransactionController` ([#1668](https://github.com/MetaMask/core/pull/1668))
207
265
  - **BREAKING**: Remove `incomingTransactions.apiKey` constructor option ([#1668](https://github.com/MetaMask/core/pull/1668))
@@ -213,36 +271,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
213
271
  - **BREAKING**: Rename the `transactionHash` property to `hash` in the transaction metadata
214
272
 
215
273
  ### Fixed
274
+
216
275
  - Fix the sorting of incoming and updated transactions ([#1652](https://github.com/MetaMask/core/pull/1652))
217
276
  - 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
277
 
219
278
  ## [10.0.0]
279
+
220
280
  ### Added
281
+
221
282
  - Add `submittedTime` to the transaction metadata ([#1645](https://github.com/MetaMask/core/pull/1645))
222
283
  - Add optional `actionId` argument to `addTransaction` and `speedUpTransaction` to prevent duplicate requests ([#1582](https://github.com/MetaMask/core/pull/1582))
223
284
  - Add `confirmExternalTransaction` method ([#1625](https://github.com/MetaMask/core/pull/1625))
224
285
 
225
286
  ### Changed
287
+
226
288
  - **BREAKING**: Rename `rawTransaction` to `rawTx` in the transaction metadata ([#1624](https://github.com/MetaMask/core/pull/1624))
227
289
 
228
290
  ## [9.2.0]
291
+
229
292
  ### Added
293
+
230
294
  - Persist `estimatedBaseFee` in `stopTransaction` and `speedUpTransaction` ([#1621](https://github.com/MetaMask/core/pull/1621))
231
295
  - Add `securityAlertResponse` to `addTransaction` `opts` argument ([#1636](https://github.com/MetaMask/core/pull/1636))
232
296
 
233
297
  ## [9.1.0]
298
+
234
299
  ### Added
300
+
235
301
  - Add `blockTimestamp` to `TransactionMetaBase` type ([#1616](https://github.com/MetaMask/core/pull/1616))
236
302
  - Update `queryTransactionStatuses` to populate `blockTimestamp` on each transaction when it is verified ([#1616](https://github.com/MetaMask/core/pull/1616))
237
303
 
238
304
  ### Changed
305
+
239
306
  - Bump dependency and peer dependency on `@metamask/approval-controller` to ^3.5.1
240
307
  - Bump dependency on `@metamask/base-controller` to ^3.2.1
241
308
  - Bump dependency on `@metamask/controller-utils` to ^4.3.2
242
309
  - Bump dependency and peer dependency on `@metamask/network-controller` to ^12.1.2
243
310
 
244
311
  ## [9.0.0]
312
+
245
313
  ### Added
314
+
246
315
  - Add `baseFeePerGas` to transaction metadata ([#1590](https://github.com/MetaMask/core/pull/1590))
247
316
  - Add `txReceipt` to transaction metadata ([#1592](https://github.com/MetaMask/core/pull/1592))
248
317
  - Add `initApprovals` method to generate approval requests from unapproved transactions ([#1575](https://github.com/MetaMask/core/pull/1575))
@@ -260,6 +329,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
260
329
  - Add `address` argument to `wipeTransactions` method ([#1573](https://github.com/MetaMask/core/pull/1573))
261
330
 
262
331
  ### Changed
332
+
263
333
  - **BREAKING**: Add required `getSelectedAddress` callback argument to constructor ([#1579](https://github.com/MetaMask/core/pull/1579))
264
334
  - **BREAKING**: Add `isSupportedNetwork` method to `RemoteTransactionSource` interface ([#1579](https://github.com/MetaMask/core/pull/1579))
265
335
  - **BREAKING**: Move all but first argument to options bag in `addTransaction` method ([#1576](https://github.com/MetaMask/core/pull/1576))
@@ -269,6 +339,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
269
339
  - This type is intended mainly for internal use, so it's likely this change doesn't affect most projects
270
340
 
271
341
  ### Removed
342
+
272
343
  - **BREAKING**: Remove `fetchAll` method ([#1579](https://github.com/MetaMask/core/pull/1579))
273
344
  - This method was used to fetch transaction history from Etherscan
274
345
  - This is now handled automatically by the controller on each new block, if polling is enabled
@@ -279,38 +350,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
279
350
  - These methods were intended mainly for internal use, so it's likely this change doesn't affect most projects
280
351
 
281
352
  ## [8.0.1]
353
+
282
354
  ### Changed
355
+
283
356
  - Replace `eth-query` ^2.1.2 with `@metamask/eth-query` ^3.0.1 ([#1546](https://github.com/MetaMask/core/pull/1546))
284
357
 
285
358
  ## [8.0.0]
359
+
286
360
  ### Changed
361
+
287
362
  - **BREAKING**: Change `babel-runtime` from a `dependency` to a `peerDependency` ([#1504](https://github.com/MetaMask/core/pull/1504))
288
363
  - Update `@metamask/utils` to `^6.2.0` ([#1514](https://github.com/MetaMask/core/pull/1514))
289
364
 
290
365
  ## [7.1.0]
366
+
291
367
  ### Added
368
+
292
369
  - Expose `HARDFORK` constant ([#1423](https://github.com/MetaMask/core/pull/1423))
293
370
  - Add support for transactions on Linea networks ([#1423](https://github.com/MetaMask/core/pull/1423))
294
371
 
295
372
  ## [7.0.0]
373
+
296
374
  ### Changed
375
+
297
376
  - **BREAKING**: Change the approveTransaction and cancelTransaction methods to private ([#1435](https://github.com/MetaMask/core/pull/1435))
298
377
  - Consumers should migrate from use of these methods to use of `processApproval`.
299
378
  - 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
379
 
301
380
  ## [6.1.0]
381
+
302
382
  ### Changed
383
+
303
384
  - Relax types of `provider` and `blockTracker` options ([#1443](https://github.com/MetaMask/core/pull/1443))
304
385
  - 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
386
 
306
387
  ## [6.0.0]
388
+
307
389
  ### Added
390
+
308
391
  - 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
392
  - The `ApprovalController:addRequest` action will be called when a new transaction is initiated
310
393
  - The `ApprovalController:rejectRequest` action will be called if a transaction fails
311
394
  - The `ApprovalController:acceptRequest` action will be called when a transaction is approved
312
395
 
313
396
  ### Changed
397
+
314
398
  - **BREAKING:** Bump to Node 16 ([#1262](https://github.com/MetaMask/core/pull/1262))
315
399
  - **BREAKING:** Update `@metamask/network-controller` dependency and peer dependency ([#1367](https://github.com/MetaMask/core/pull/1367))
316
400
  - This affects the `getNetworkState` and `onNetworkStateChange` constructor parameters
@@ -326,51 +410,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
326
410
  - Add `@metamask/utils` dependency ([#1367](https://github.com/MetaMask/core/pull/1367))
327
411
 
328
412
  ### Fixed
413
+
329
414
  - Fix inaccurate hard-coded `chainId` on incoming token transactions ([#1366](https://github.com/MetaMask/core/pull/1366))
330
415
 
331
416
  ## [5.0.0]
417
+
332
418
  ### Changed
419
+
333
420
  - **BREAKING**: peerDeps: @metamask/network-controller@6.0.0->8.0.0 ([#1196](https://github.com/MetaMask/core/pull/1196))
334
421
  - deps: eth-rpc-errors@4.0.0->4.0.2 ([#1215](https://github.com/MetaMask/core/pull/1215))
335
422
  - 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`).
423
+ - 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
424
  - 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
425
  - This should result in no functional changes, except that the nonce middleware is no longer required.
339
426
 
340
427
  ## [4.0.1]
428
+
341
429
  ### Changed
430
+
342
431
  - Use `NetworkType` enum for chain configuration ([#1132](https://github.com/MetaMask/core/pull/1132))
343
432
 
344
433
  ## [4.0.0]
434
+
345
435
  ### Removed
436
+
346
437
  - **BREAKING:** Remove `isomorphic-fetch` ([#1106](https://github.com/MetaMask/controllers/pull/1106))
347
438
  - Consumers must now import `isomorphic-fetch` or another polyfill themselves if they are running in an environment without `fetch`
348
439
 
349
440
  ## [3.0.0]
441
+
350
442
  ### Added
443
+
351
444
  - Add Etherscan API support for Sepolia and Goerli ([#1041](https://github.com/MetaMask/controllers/pull/1041))
352
445
  - Export `isEIP1559Transaction` function from package ([#1058](https://github.com/MetaMask/controllers/pull/1058))
353
446
 
354
447
  ### Changed
448
+
355
449
  - **BREAKING**: Drop Etherscan API support for Ropsten, Rinkeby, and Kovan ([#1041](https://github.com/MetaMask/controllers/pull/1041))
356
450
  - Rename this repository to `core` ([#1031](https://github.com/MetaMask/controllers/pull/1031))
357
451
  - Update `@metamask/controller-utils` package ([#1041](https://github.com/MetaMask/controllers/pull/1041))
358
452
 
359
453
  ## [2.0.0]
454
+
360
455
  ### Changed
456
+
361
457
  - **BREAKING:** Update `getNetworkState` constructor option to take an object with `providerConfig` property rather than `providerConfig` ([#995](https://github.com/MetaMask/core/pull/995))
362
458
  - 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
459
 
364
460
  ## [1.0.0]
461
+
365
462
  ### Added
463
+
366
464
  - Initial release
465
+
367
466
  - 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:
467
+
368
468
  - Everything in `src/transaction`
369
469
  - Transaction-related functions from `src/util.ts` and accompanying tests
370
470
 
371
471
  All changes listed after this point were applied to this package following the monorepo conversion.
372
472
 
373
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@21.0.0...HEAD
473
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@21.1.0...HEAD
474
+ [21.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@21.0.1...@metamask/transaction-controller@21.1.0
475
+ [21.0.1]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@21.0.0...@metamask/transaction-controller@21.0.1
374
476
  [21.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@20.0.0...@metamask/transaction-controller@21.0.0
375
477
  [20.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@19.0.1...@metamask/transaction-controller@20.0.0
376
478
  [19.0.1]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@19.0.0...@metamask/transaction-controller@19.0.1
@@ -117,6 +117,7 @@ export declare class TransactionController extends BaseControllerV1<TransactionC
117
117
  private readonly pendingTransactionTracker;
118
118
  private readonly cancelMultiplier;
119
119
  private readonly speedUpMultiplier;
120
+ private readonly signAbortCallbacks;
120
121
  private readonly afterSign;
121
122
  private readonly beforeApproveOnInit;
122
123
  private readonly beforeCheckPendingTransaction;
@@ -478,6 +479,12 @@ export declare class TransactionController extends BaseControllerV1<TransactionC
478
479
  * Removes unapproved transactions from state.
479
480
  */
480
481
  clearUnapprovedTransactions(): void;
482
+ /**
483
+ * Stop the signing process for a specific transaction.
484
+ * Throws an error causing the transaction status to be set to failed.
485
+ * @param transactionId - The ID of the transaction to stop signing.
486
+ */
487
+ abortTransactionSigning(transactionId: string): void;
481
488
  private addMetadata;
482
489
  private updateGasProperties;
483
490
  private getCurrentChainTransactionsByStatus;
@@ -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,KAA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AUxC;;;;;;OAMG;YACW,wBAAwB;YAexB,uBAAuB;IAYrC,OAAO,CAAC,qCAAqC;YAsB/B,eAAe;IA+D7B,OAAO,CAAC,yBAAyB;IAIjC,OAAO,CAAC,kCAAkC;IAY1C,OAAO,CAAC,2BAA2B;IAcnC,OAAO,CAAC,sBAAsB;YAehB,iBAAiB;CAsBhC"}
@@ -100,6 +100,7 @@ class TransactionController extends base_controller_1.BaseControllerV1 {
100
100
  super(config, state);
101
101
  this.inProcessOfSigning = new Set();
102
102
  this.mutex = new async_mutex_1.Mutex();
103
+ this.signAbortCallbacks = new Map();
103
104
  /**
104
105
  * EventEmitter instance used to listen to specific transactional events
105
106
  */
@@ -899,6 +900,9 @@ class TransactionController extends base_controller_1.BaseControllerV1 {
899
900
  updatedTransactionMeta.error = (0, utils_1.normalizeTxError)(new Error(errorMessage));
900
901
  }
901
902
  this.updateTransaction(updatedTransactionMeta, `TransactionController:updateCustodialTransaction - Custodial transaction updated`);
903
+ if ([types_1.TransactionStatus.submitted, types_1.TransactionStatus.failed].includes(status)) {
904
+ this.hub.emit(`${transactionMeta.id}:finished`, updatedTransactionMeta);
905
+ }
902
906
  }
903
907
  /**
904
908
  * Creates approvals for all unapproved transactions persisted.
@@ -1031,6 +1035,23 @@ class TransactionController extends base_controller_1.BaseControllerV1 {
1031
1035
  const transactions = this.state.transactions.filter(({ status }) => status !== types_1.TransactionStatus.unapproved);
1032
1036
  this.update({ transactions: this.trimTransactionsForState(transactions) });
1033
1037
  }
1038
+ /**
1039
+ * Stop the signing process for a specific transaction.
1040
+ * Throws an error causing the transaction status to be set to failed.
1041
+ * @param transactionId - The ID of the transaction to stop signing.
1042
+ */
1043
+ abortTransactionSigning(transactionId) {
1044
+ const transactionMeta = this.getTransaction(transactionId);
1045
+ if (!transactionMeta) {
1046
+ throw new Error(`Cannot abort signing as no transaction metadata found`);
1047
+ }
1048
+ const abortCallback = this.signAbortCallbacks.get(transactionId);
1049
+ if (!abortCallback) {
1050
+ throw new Error(`Cannot abort signing as transaction is not waiting for signing`);
1051
+ }
1052
+ abortCallback();
1053
+ this.signAbortCallbacks.delete(transactionId);
1054
+ }
1034
1055
  addMetadata(transactionMeta) {
1035
1056
  const { transactions } = this.state;
1036
1057
  transactions.push(transactionMeta);
@@ -1544,12 +1565,16 @@ class TransactionController extends base_controller_1.BaseControllerV1 {
1544
1565
  this.pendingTransactionTracker.hub.on('transaction-updated', this.updateTransaction.bind(this));
1545
1566
  }
1546
1567
  signTransaction(transactionMeta, txParams) {
1547
- var _a;
1548
1568
  return __awaiter(this, void 0, void 0, function* () {
1549
1569
  (0, logger_1.projectLogger)('Signing transaction', txParams);
1550
1570
  const unsignedEthTx = this.prepareUnsignedEthTx(txParams);
1551
1571
  this.inProcessOfSigning.add(transactionMeta.id);
1552
- const signedTx = yield ((_a = this.sign) === null || _a === void 0 ? void 0 : _a.call(this, unsignedEthTx, txParams.from, ...this.getAdditionalSignArguments(transactionMeta)));
1572
+ const signedTx = yield new Promise((resolve, reject) => {
1573
+ var _a;
1574
+ (_a = this.sign) === null || _a === void 0 ? void 0 : _a.call(this, unsignedEthTx, txParams.from, ...this.getAdditionalSignArguments(transactionMeta)).then(resolve, reject);
1575
+ this.signAbortCallbacks.set(transactionMeta.id, () => reject(new Error('Signing aborted by user')));
1576
+ });
1577
+ this.signAbortCallbacks.delete(transactionMeta.id);
1553
1578
  if (!signedTx) {
1554
1579
  (0, logger_1.projectLogger)('Skipping signed status as no signed transaction');
1555
1580
  return undefined;