Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit ff53857

Browse files
oxSaturnjxom
andauthored
fix: import EthereumProvider instead of default (#382)
* fix: import EthereumProvider instead of default * Update violet-days-arrive.md --------- Co-authored-by: jxom <jakemoxey@gmail.com>
1 parent 97dbd44 commit ff53857

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.changeset/violet-days-arrive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@wagmi/connectors": patch
3+
---
4+
5+
Fixed issue importing `EthereumProvider` in Vite environments.

packages/connectors/src/walletConnect.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,8 @@ export class WalletConnectConnector extends Connector<
284284
}
285285

286286
async #initProvider() {
287-
const {
288-
default: EthereumProvider,
289-
OPTIONAL_EVENTS,
290-
OPTIONAL_METHODS,
291-
} = await import('@walletconnect/ethereum-provider')
287+
const { EthereumProvider, OPTIONAL_EVENTS, OPTIONAL_METHODS } =
288+
await import('@walletconnect/ethereum-provider')
292289
const [defaultChain, ...optionalChains] = this.chains.map(({ id }) => id)
293290
if (defaultChain) {
294291
const {

0 commit comments

Comments
 (0)