@toruslabs/ethereum-controllers 5.3.0 → 5.3.2

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.
@@ -3764,11 +3764,12 @@ class PreferencesController extends BasePreferencesController {
3764
3764
  const duplicateIndex = storePastTx.findIndex(x => x.transaction_hash === tx.transaction_hash && x.chainId === tx.chain_id);
3765
3765
  if (tx.status === TransactionStatus.submitted || tx.status === TransactionStatus.confirmed) {
3766
3766
  if (duplicateIndex === -1) {
3767
+ var _tx$to;
3767
3768
  // No duplicate found
3768
3769
 
3769
3770
  const finalTx = this.cancelTxCalculate([...storePastTx, formattedTx]);
3770
3771
  tx.is_cancel = formattedTx.is_cancel;
3771
- tx.to = tx.to.toLowerCase();
3772
+ tx.to = (_tx$to = tx.to) === null || _tx$to === void 0 ? void 0 : _tx$to.toLowerCase();
3772
3773
  tx.from = tx.from.toLowerCase();
3773
3774
  this.updateState({
3774
3775
  formattedPastTransactions: finalTx
@@ -3989,7 +3990,8 @@ class PreferencesController extends BasePreferencesController {
3989
3990
  const pendingTx = [];
3990
3991
  const lowerCaseSelectedAddress = address.toLowerCase();
3991
3992
  for (const x of txs) {
3992
- if (x.chain_id === SUPPORTED_NETWORKS[this.getProviderConfig().chainId].chainId && x.to && x.from && (lowerCaseSelectedAddress === x.from.toLowerCase() || lowerCaseSelectedAddress === x.to.toLowerCase())) {
3993
+ var _x$to;
3994
+ 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()))) {
3993
3995
  if (x.status !== "confirmed") {
3994
3996
  pendingTx.push(x);
3995
3997
  } else {