File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
packages/wagmi-adapter/src Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @thirdweb-dev/wagmi-adapter " : patch
3+ ---
4+
5+ Add onConnect callback
Original file line number Diff line number Diff line change @@ -9,12 +9,14 @@ import {
99 type MultiStepAuthArgsType ,
1010 type SingleStepAuthArgsType ,
1111 inAppWallet as thirdwebInAppWallet ,
12+ type Wallet ,
1213} from "thirdweb/wallets" ;
1314
1415export type InAppWalletParameters = Prettify <
1516 InAppWalletCreationOptions & {
1617 client : ThirdwebClient ;
1718 ecosystemId ?: `ecosystem.${string } `;
19+ onConnect ?: ( wallet : Wallet ) => void ;
1820 }
1921> ;
2022export type InAppWalletConnector = ReturnType < typeof inAppWalletConnector > ;
@@ -106,6 +108,7 @@ export function inAppWalletConnector(
106108 chain : defineChain ( chainId ) ,
107109 client,
108110 wallets : [ wallet ] ,
111+ onConnect : args . onConnect ,
109112 } ) ;
110113
111114 const account = wallet . getAccount ( ) ;
@@ -166,6 +169,7 @@ export function inAppWalletConnector(
166169 chain,
167170 client,
168171 wallets : [ wallet ] ,
172+ onConnect : args . onConnect ,
169173 } ) ;
170174 }
171175 return EIP1193 . toProvider ( {
You can’t perform that action at this time.
0 commit comments