Comments (17)
Tried it with Connectkit and Rainbow Wallet before switching things up, But will try this and let you know. @joaquim-verges
from js.
@AngelofPc can you share how you're passing the external provider? here's a working example in our portal: https://portal.thirdweb.com/sdk/set-up-the-sdk/frontend#from-a-signer--provider
from js.
Here @joaquim-verges
from js.
@AngelofPc looking at your stack trace, you're using the ConnectWallet
component. That's only usable with the ThirdwebProvider
which manages the wallet connection for you.
If you want to pass your own wagmi signer/provider using the ThirdwebSDKProvider
, then you need to implement the wallet connection logic some other way. Here's an example using rainbowkit https://blog.avneesh.tech/how-to-use-rainbowkit-with-thirdweb
from js.
Not working, same as before.
I think it's the now deprecated "useNftCollection" causing it.
I see that we are supposed to now use useContract() but there is no documentation for it or how to do a signature mint with it? @joaquim-verges
from js.
@AngelofPc but are you still using the ConnectWallet
component from @thirdweb-dev/react
in your code?
Btw curious why you need to pass the provider externally? Wonder if you can just use the normal thirdweb react setup to achieve what you want.
from js.
No, i'm no longer using the ConnectWallet
component.
Want to pass the use either ConnectKit
or RainbowKit
because of their UI especially.
Worked better before @thirdweb-dev/react 3.0.0
though.
@joaquim-verges
from js.
Got it. I think i see what the problem is. We'll get that fixed this week.
Thanks for reporting this 🙏
cc @jnsdls
from js.
Thanks @joaquim-verges, Really appreciate.
Could you please let me know when it's done?
I'm present in the discord as well if it's easier.
from js.
@AngelofPc can you try this build and let me know if everything works for you?
npm install @thirdweb-dev/[email protected] @thirdweb-dev/[email protected]
from js.
Works so far, thanks @joaquim-verges.
However, I noticed DevTools getting disconnected every time since i installed the update
Also, can you help with your email or twitter handle, I'd like your answer/feedback on something.
Thanks
from js.
I still have the error Must be used within Provider
, I don't understand why my _app
is pretty simple :
<WagmiConfig client={wagmiClient}>
<SessionProvider refetchInterval={0} session={pageProps.session}>
<RainbowKitSiweNextAuthProviderCustom>
<RainbowKitProvider chains={chains}>
<ThirdwebProvider wagmiClient={wagmiClient}>
<AnimatePresence exitBeforeEnter>
{getLayout(<Component {...pageProps} />)}
</AnimatePresence>
</ThirdwebProvider>
</RainbowKitProvider>
</RainbowKitSiweNextAuthProviderCustom>
</SessionProvider>
</WagmiConfig>
Here is the trace. @joaquim-verges any idea? (using @thirdweb-dev/[email protected] @thirdweb-dev/[email protected])
from js.
@sense thanks for reporting this.
What's inside your Claim
component? Looks like the error is coming from there.
In general the thing to keep in mind when using an external wallet connector is that you can't use the thirdweb hooks related to wallet connection (like useAddress, useChainId etc) - those require the standard ThirdwebProvider
since that's what would normally handle the wallet connection internally.
Instead for these wallet related hooks, you should use the ones from the library you're using (wagmi in your case).
All the contract related hooks should be usable though, that's what the dev build fixes (will ship it to stable today)
from js.
Thanks @joaquim-verges my Claim page looks like :
// Disable SSR as thirdweb SDK only working on browser
const Claim = dynamic(() => import('../../components/Claim'), {
ssr: false
})
const NftClaimPage = () => {
return (
<div className="flex flex-col">
<Claim contractAddress={process.env.editionDropAddress} />
</div>
)
}
The thing that Thirdweb hooks are working great using the v2 of @thirdweb-dev/react
and @thirdweb-dev/sdk
so it's probably related to the v3 ? There is an opened thread on it on [this Discord thread].
(https://discord.com/channels/834227967404146718/1020660790296072242)
I made it work with the magicLinkWalletConnector
as an external connector, but still with the v2.
from js.
@sense and it still happens with the latest releases? (v3.0.4)
we might have missed another hook that uses the wallet connection hooks internally. The stacktrace shows that something inside that /components/Claim
is causing the issue. Likely one of our hooks. If you can help me pin point which one I can get a fix out very quickly.
from js.
@sense also - unrelated, but if you want to ping me on discord about that Disable SSR as thirdweb SDK only working on browser
- i'm curious why you think that. We use our SDK in SSR on our dashboard so it's definitely possible!
from js.
Let's continue the discussion on Discord then @joaquim-verges, thank you.
from js.
Related Issues (20)
- Progressive migration not working with Next.js v14.2.5, keep getting the error "Error: No QueryClient set, use QueryClientProvider to set one" HOT 4
- [CLI] unknown option '--yes' HOT 2
- [Dashboard] - Duplicate / in Block Explorer URL HOT 2
- Icon Missing for Metamask in Thirdweb ConnectWallet Component on React Native HOT 1
- Broken link on Thirdweb Portal: /cli/build Page not Accessible HOT 1
- Connect UI doesn't display image passed to the inAppWallet()'s metaData HOT 3
- Coinbase Wallet Shows Incorrect ERC20 Token Total Supply HOT 2
- [React] [Thirdweb v5] Feature Request ✨ : Screen options arg in useWalletDetailsModal hook HOT 1
- How to deal with chain switching on Coinbase Smart Wallet? HOT 1
- ERROR in ./node_modules/thirdweb/node_modules/@walletconnect/utils/dist/index.es.js HOT 2
- [Styling][Responsive] No ability to style the Modal and Details components from ConnectButton HOT 3
- ConnectButton status incorrect after manual disconnect HOT 2
- Warning Appears When Opening the Modal HOT 1
- Unable to Scroll the Modal When Window Height is Low HOT 1
- ws affected by a DoS when handling a request with many HTTP headers HOT 3
- `thirdweb deploy` does not respect `--file` option when using `--ci` flag HOT 3
- How to use Multicall to read contracts at once? HOT 11
- ThirdwebProvider WalletConnet Auto Connect fails HOT 1
- 'getOwnedTokenIds' function in sdk v5 is a repitition of 'getOwnedNFTs' function HOT 1
- Get transaction hash of a pending transaction. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js.