@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.
- package/dist/ethereumControllers.cjs.js +5 -3
- package/dist/ethereumControllers.cjs.js.map +1 -1
- package/dist/ethereumControllers.esm.js +5 -3
- package/dist/ethereumControllers.esm.js.map +1 -1
- package/dist/ethereumControllers.umd.min.js +1 -1
- package/dist/ethereumControllers.umd.min.js.map +1 -1
- package/dist/types/utils/interfaces.d.ts +1 -0
- package/package.json +4 -4
- package/src/Preferences/PreferencesController.ts +2 -2
- package/src/Transaction/TransactionController.ts +1 -1
- package/src/utils/interfaces.ts +1 -0
|
@@ -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
|
-
|
|
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 {
|
|
@@ -5904,7 +5906,7 @@ class TransactionController extends TransactionStateManager {
|
|
|
5904
5906
|
category,
|
|
5905
5907
|
methodParams
|
|
5906
5908
|
} = await determineTransactionType(txParameters, this.provider);
|
|
5907
|
-
txMeta.
|
|
5909
|
+
txMeta.contractType = type;
|
|
5908
5910
|
txMeta.transactionCategory = category;
|
|
5909
5911
|
txMeta.methodParams = methodParams;
|
|
5910
5912
|
txMeta.transaction.value = txMeta.transaction.value ? addHexPrefix(txMeta.transaction.value) : "0x0";
|