@metamask-previews/transaction-controller 41.1.0-preview-16ba2ba → 42.0.0-preview-a283708e

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
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [42.0.0]
11
+
10
12
  ### Added
11
13
 
12
14
  - Retrieve incoming transactions using Accounts API ([#4927](https://github.com/MetaMask/core/pull/4927))
@@ -20,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
22
  - `startIncomingTransactionPolling`
21
23
  - `stopIncomingTransactionPolling`
22
24
  - `updateIncomingTransactions`
25
+ - Bump `@metamask/eth-block-tracker` from `^11.0.2` to `^11.0.3` ([#5025](https://github.com/MetaMask/core/pull/5025))
23
26
 
24
27
  ### Removed
25
28
 
@@ -1212,7 +1215,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
1215
 
1213
1216
  All changes listed after this point were applied to this package following the monorepo conversion.
1214
1217
 
1215
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@41.1.0...HEAD
1218
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@42.0.0...HEAD
1219
+ [42.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@41.1.0...@metamask/transaction-controller@42.0.0
1216
1220
  [41.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@41.0.0...@metamask/transaction-controller@41.1.0
1217
1221
  [41.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@40.1.0...@metamask/transaction-controller@41.0.0
1218
1222
  [40.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@40.0.0...@metamask/transaction-controller@40.1.0
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ /* istanbul ignore file */
3
+ // FIXME - remove above ignore
2
4
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
3
5
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4
6
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
@@ -625,6 +627,7 @@ class TransactionController extends base_controller_1.BaseController {
625
627
  this.onTransactionStatusChange(updatedTransactionMeta);
626
628
  // Intentional given potential duration of process.
627
629
  this.updatePostBalance(updatedTransactionMeta).catch((error) => {
630
+ /* istanbul ignore next */
628
631
  (0, logger_1.projectLogger)('Error while updating post balance', error);
629
632
  throw error;
630
633
  });
@@ -861,9 +864,6 @@ class TransactionController extends base_controller_1.BaseController {
861
864
  if (!transactionMeta) {
862
865
  throw new Error(`Cannot update custodial transaction as no transaction metadata found`);
863
866
  }
864
- if (!transactionMeta.custodyId) {
865
- throw new Error('Transaction must be a custodian transaction');
866
- }
867
867
  if (status &&
868
868
  ![
869
869
  types_1.TransactionStatus.submitted,
@@ -1223,7 +1223,7 @@ class TransactionController extends base_controller_1.BaseController {
1223
1223
  });
1224
1224
  this.onTransactionStatusChange(transactionMeta);
1225
1225
  const rawTx = await __classPrivateFieldGet(this, _TransactionController_trace, "f").call(this, { name: 'Sign', parentContext: traceContext }, () => this.signTransaction(transactionMeta, transactionMeta.txParams));
1226
- if (!this.beforePublish(transactionMeta)) {
1226
+ if (!this.beforePublish(transactionMeta, rawTx)) {
1227
1227
  (0, logger_1.projectLogger)('Skipping publishing transaction based on hook');
1228
1228
  this.messagingSystem.publish(`${controllerName}:transactionPublishingSkipped`, transactionMeta);
1229
1229
  return ApprovalState.SkippedViaBeforePublishHook;
@@ -1824,7 +1824,6 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
1824
1824
  }),
1825
1825
  hooks: {
1826
1826
  beforeCheckPendingTransaction: this.beforeCheckPendingTransaction.bind(this),
1827
- beforePublish: this.beforePublish.bind(this),
1828
1827
  },
1829
1828
  });
1830
1829
  __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_addPendingTransactionTrackerListeners).call(this, pendingTransactionTracker);