You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/portal/src/app/connect/wallet/sign-in-methods/configure/page.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,9 @@ To enable a given sign-in method for the thirdweb wallet, refer to the following
67
67
68
68
### Ecosystem Wallets
69
69
70
-
In order to configure sign-in options for all appswithin your ecosystem, first configure the allowed sign-in methods on [your dashboard](https://thirdweb.com/team/~/~/ecosystem).
70
+
71
+
In order to configure sign-in options for all apps within your ecosystem, first configure the allowed sign-in methods on [your dashboard](https://thirdweb.com/team/~/~/ecosystem).
### Converting a wagmi wallet client to a thirdweb wallet
74
+
17
75
You can use the thirdweb SDK within a wagmi application by setting the wagmi connected account as the thirdweb 'active wallet'. After that, you can use all of the react components and hooks normally, including `PayEmbed`, `TransactionButton`, etc.
18
76
19
77
```ts
@@ -28,37 +86,28 @@ import { viemAdapter } from "thirdweb/adapters/viem";
28
86
import { client } from'./client'
29
87
30
88
31
-
const { data: walletClient } =useWalletClient(); // from wagmi
32
-
const { disconnectAsync } =useDisconnect(); // from wagmi
33
-
const { switchChainAsync } =useSwitchChain(); // from wagmi
89
+
const account =useAccount(); // from wagmi
34
90
const setActiveWallet =useSetActiveWallet(); // from thirdweb/react
35
91
36
-
// whenever the walletClient changes,
37
-
// we adapt it to a thirdweb account and set it as the active wallet
38
-
useEffect(() => {
92
+
// whenever the wagmi account changes,
93
+
// we adapt it to a thirdweb wallet and set it as the active wallet
0 commit comments