svelte-web3 icon indicating copy to clipboard operation
svelte-web3 copied to clipboard

Unable to use Web3Modal & WalletConnect on Sveltekit

Open kuberaella opened this issue 2 years ago • 2 comments

Hey, I'm trying to see the Modal in Sveltekit and I get a blank modal (maybe because providers aren't loaded?) So I try to add WalletConnect but it throws an error that globals aren't defined. So I tried const WalletConnectProvider = await import("@walletconnect/web3-provider"); But after that the error just moves to index.ts:19 instead of the main scope Edit: It happens with all the external wallets

kuberaella avatar Sep 26 '21 22:09 kuberaella

I'm not sure this is really related to svelte-web3. Could you commit a small test case that reproduce this somewhere ?

clbrge avatar Nov 20 '21 16:11 clbrge

I've experienced problems with walletconnectprovider/web-3 as well and it seems to be an issue with vite, here are a handful of open tickets: https://github.com/WalletConnect/walletconnect-monorepo/issues/864 and https://github.com/WalletConnect/walletconnect-monorepo/issues/341

I tried the workaround suggested in the last comment on issue 341 about importing the umd dist file, which seems to work for now.

cswkim avatar Mar 29 '22 14:03 cswkim