@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.
- package/dist/ethereumControllers.cjs.js +4 -2
- package/dist/ethereumControllers.cjs.js.map +1 -1
- package/dist/ethereumControllers.esm.js +4 -2
- 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/package.json +5 -5
- package/src/Preferences/PreferencesController.ts +2 -2
|
@@ -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 {
|