Yeah I remember it was mentioned there’s a bit of bug in the latest one, you should revert to 0.0.184 to use walletconnect at the moment, but a bug fixes is coming
okay, can I get an update once that bug is fixed.
I will keep watching this post for the update.
sure thing for sure
Hey @vikasg, btw just checked on this and looks like walletconnect works fine on v1.0.3, can you copy any error from the console if there’s any?
Hi @YosephKS
Here is the code:
<script src="https://unpkg.com/[email protected]/dist/moralis.js"></script>
async function loginWalletConnect() {
let user = Moralis.User.current();
if (!user) {
await Moralis.authenticate({ provider: "walletconnect", signingMessage: "Signing in to SHIBIC" });
}
}
and the error:
Uncaught (in promise) Error: Cannot enable WalletConnect: dependency "@walletconnect/web3-provider" is missing
at WalletConnectWeb3Connector.<anonymous> (moralis.js:27670:23)
at tryCatch (moralis.js:72589:40)
at Generator.invoke [as _invoke] (moralis.js:72820:22)
at Generator.next (moralis.js:72645:21)
at asyncGeneratorStep (moralis.js:29235:24)
at _next (moralis.js:29257:9)
you just haven’t imported walletconnect library to your project, add
<script src="https://github.com/WalletConnect/walletconnect-monorepo/releases/download/1.6.2/web3-provider.min.js"></script>
in your HTML file
Sorry, I forgot to mention earlier, the walletconnect lib is already included, and I am using the new version 1.7.0.
<script src="https://github.com/WalletConnect/walletconnect-monorepo/releases/download/1.7.0/web3-provider.min.js"></script>
Tried with your version as well (1.6.2), but still the same issue.
hang on how about let’s use the unpkg version, let me write it down a moment
can you share a complete minimal code that doesn’t work for you?
Also having the Same problem, thats why i canged my livestuff back to old Moralis 0.0.184. But wanna update this soon. So far locally everything is working, beside of the walletconnect … and as my community is mostly using walletconnect they would kill me if this is not available haha.
Tried your solution @YosephKS but still the same error.
still does not work, same error:
moralis.js:27670 Uncaught (in promise) Error: Cannot enable WalletConnect: dependency "@walletconnect/web3-provider" is missing
at WalletConnectWeb3Connector.<anonymous> (moralis.js:27670:23)
at tryCatch (moralis.js:72589:40)
at Generator.invoke [as _invoke] (moralis.js:72820:22)
at Generator.next (moralis.js:72645:21)
at asyncGeneratorStep (moralis.js:29235:24)
at _next (moralis.js:29257:9)
Hi @cryptokid, this is the complete minimal code which is not working:
<script src="https://unpkg.com/[email protected]/dist/moralis.js"></script>
<script src="https://unpkg.com/@walletconnect/[email protected]"></script>
async function loginWalletConnect() {
let user = Moralis.User.current();
if (!user) {
await Moralis.authenticate({ provider: "walletconnect", signingMessage: "Signing in to SHIBIC" });
}
}
@Erno any input on this? seems like the WC import on version >1.0.0 is not working or something missing
Hi @vikasg !
Try it:
<script src="https://unpkg.com/[email protected]/dist/moralis.js"></script>
<script src="https://github.com/WalletConnect/walletconnect-monorepo/releases/download/1.6.6/web3-provider.min.js"></script>
Works for me right now.
Thanks @blackwater, this indeed works.
But I was trying using Moralis latest sdk, v1.0.3, and facing issue there.
Thanks for your help anyways, appreciate your effort.
Can you try if it works with moralis v1.0.4, we just released a fix
Hi, I am facing the exact same issue
I have
- Moralis v1.9.1
- @walletconnect/web3-provider v1.7.8
I do this with await Moralis.authenticate({ type: 'walletconnect' })
in Vue3 and still have the same issue
in my console.log(e)
Cannot enable via WalletConnect: dependency "@walletconnect/web3-provider" is missing
Hello can you make a new thread please with more details e.g. your Vue component code.