@toruslabs/ethereum-controllers 5.3.1 → 5.3.3

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.
@@ -4244,11 +4244,12 @@ class PreferencesController extends base_controllers_namespaceObject.BasePrefere
4244
4244
  const duplicateIndex = storePastTx.findIndex(x => x.transaction_hash === tx.transaction_hash && x.chainId === tx.chain_id);
4245
4245
  if (tx.status === base_controllers_namespaceObject.TransactionStatus.submitted || tx.status === base_controllers_namespaceObject.TransactionStatus.confirmed) {
4246
4246
  if (duplicateIndex === -1) {
4247
+ var _tx$to;
4247
4248
  // No duplicate found
4248
4249
 
4249
4250
  const finalTx = this.cancelTxCalculate([...storePastTx, formattedTx]);
4250
4251
  tx.is_cancel = formattedTx.is_cancel;
4251
- tx.to = tx.to.toLowerCase();
4252
+ tx.to = (_tx$to = tx.to) === null || _tx$to === void 0 ? void 0 : _tx$to.toLowerCase();
4252
4253
  tx.from = tx.from.toLowerCase();
4253
4254
  this.updateState({
4254
4255
  formattedPastTransactions: finalTx
@@ -4469,7 +4470,8 @@ class PreferencesController extends base_controllers_namespaceObject.BasePrefere
4469
4470
  const pendingTx = [];
4470
4471
  const lowerCaseSelectedAddress = address.toLowerCase();
4471
4472
  for (const x of txs) {
4472
- if (x.chain_id === SUPPORTED_NETWORKS[this.getProviderConfig().chainId].chainId && x.to && x.from && (lowerCaseSelectedAddress === x.from.toLowerCase() || lowerCaseSelectedAddress === x.to.toLowerCase())) {
4473
+ var _x$to;
4474
+ if (x.chain_id === SUPPORTED_NETWORKS[this.getProviderConfig().chainId].chainId && x.to && x.from && (lowerCaseSelectedAddress === x.from.toLowerCase() || lowerCaseSelectedAddress === ((_x$to = x.to) === null || _x$to === void 0 ? void 0 : _x$to.toLowerCase()))) {
4473
4475
  if (x.status !== "confirmed") {
4474
4476
  pendingTx.push(x);
4475
4477
  } else {
@@ -6463,7 +6465,7 @@ class TransactionController extends TransactionStateManager {
6463
6465
  category,
6464
6466
  methodParams
6465
6467
  } = await determineTransactionType(txParameters, this.provider);
6466
- txMeta.type = type;
6468
+ txMeta.contractType = type;
6467
6469
  txMeta.transactionCategory = category;
6468
6470
  txMeta.methodParams = methodParams;
6469
6471
  txMeta.transaction.value = txMeta.transaction.value ? (0,util_namespaceObject.addHexPrefix)(txMeta.transaction.value) : "0x0";