From 37b1de11b5b36a7556d7a5a84cfe406a86ae9b21 Mon Sep 17 00:00:00 2001
From: Sven <38101365+svenvoskamp@users.noreply.github.com>
Date: Tue, 6 Feb 2024 17:38:15 +0100
Subject: [PATCH] Fix/ethers unsupported error (#1876)
---
packages/ethers/src/client.ts | 4 ++++
packages/ethers5/src/client.ts | 4 ++++
.../src/composites/wui-list-wallet-transaction/index.ts | 8 +-------
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/packages/ethers/src/client.ts b/packages/ethers/src/client.ts
index 92f5571c64..05be73c2cb 100644
--- a/packages/ethers/src/client.ts
+++ b/packages/ethers/src/client.ts
@@ -818,6 +818,10 @@ export class Web3Modal extends Web3ModalScaffold {
await this.syncBalance(address)
}
}
+ } else if (isConnected) {
+ this.setCaipNetwork({
+ id: `${ConstantsUtil.EIP155}:${chainId}`
+ })
}
}
}
diff --git a/packages/ethers5/src/client.ts b/packages/ethers5/src/client.ts
index 959b8e88a5..69b1d1adad 100644
--- a/packages/ethers5/src/client.ts
+++ b/packages/ethers5/src/client.ts
@@ -751,6 +751,10 @@ export class Web3Modal extends Web3ModalScaffold {
await this.syncBalance(address)
}
}
+ } else if (isConnected) {
+ this.setCaipNetwork({
+ id: `${ConstantsUtil.EIP155}:${chainId}`
+ })
}
}
}
diff --git a/packages/ui/src/composites/wui-list-wallet-transaction/index.ts b/packages/ui/src/composites/wui-list-wallet-transaction/index.ts
index e8ddf9b3ab..95899c71d9 100644
--- a/packages/ui/src/composites/wui-list-wallet-transaction/index.ts
+++ b/packages/ui/src/composites/wui-list-wallet-transaction/index.ts
@@ -41,7 +41,7 @@ export class WuiListWalletTransaction extends LitElement {
@@ -56,12 +56,6 @@ export class WuiListWalletTransaction extends LitElement {
return html``
}
-
- private onExplorer() {
- if (this.addressExplorerUrl) {
- window.open(this.addressExplorerUrl, '_blank', 'noreferrer noopener')
- }
- }
}
declare global {