thirdweb-dev / js

Best in class web3 SDKs for Browser, Node and Mobile apps
https://thirdweb.com
Apache License 2.0
430 stars 328 forks source link

how to use wagmi/vue with useSetActiveWallet ? #3205

Closed reslear closed 3 months ago

reslear commented 4 months ago

we have inly react import useSetActiveWallet how to use in @wagmi/vue ?

  const setActiveWallet = useSetActiveWallet()

also @wagmi/vue not support useWalletClient (https://github.com/wevm/wagmi/discussions/4005)

could you create a working playground/demo for vue ? (Otherwise I don't see how we can migrate by the end of June and have to part ways. )

MananTank commented 4 months ago

Hi @reslear - Can you give more info on what you are trying to do and what features of thirdweb SDK you want to use?

reslear commented 4 months ago

I'm trying to replicate https://github.com/thirdweb-example/wagmi-thirdweb only in vue.

joaquim-verges commented 4 months ago

you should be able to just use the viem adapter, like:

const account = viemAdapter.walletClient.fromViem({ walletClient });

and keep the account around using your state manager of choice. With that account you can use the rest of the SDK to send transactions.