@toruslabs/ethereum-controllers 5.3.1 → 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 +4 -4
- package/src/Preferences/PreferencesController.ts +2 -2
|
@@ -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
|
-
|
|
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 {
|