@@ -14,7 +14,7 @@ export default function useWalletKitEventsManager(initialized: boolean) {
1414 *****************************************************************************/
1515 const onSessionProposal = useCallback (
1616 ( proposal : SignClientTypes . EventArguments [ 'session_proposal' ] ) => {
17- console . log ( 'onSessionProposal' , proposal ) ;
17+ console . log ( 'onSessionProposal' , JSON . stringify ( proposal , null , 2 ) ) ;
1818 // set the verify context so it can be displayed in the projectInfoCard
1919 SettingsStore . setCurrentRequestVerifyContext ( proposal . verifyContext ) ;
2020
@@ -41,7 +41,9 @@ export default function useWalletKitEventsManager(initialized: boolean) {
4141 console . log ( 'onSessionRequest' , requestEvent ) ;
4242 const { topic, params, verifyContext} = requestEvent ;
4343 const { request} = params ;
44+ console . log ( 'request' , JSON . stringify ( requestEvent , null , 2 ) ) ;
4445 const requestSession = walletKit . engine . signClient . session . get ( topic ) ;
46+ console . log ( 'requestSession' , JSON . stringify ( requestSession , null , 2 ) ) ;
4547 // set the verify context so it can be displayed in the projectInfoCard
4648 SettingsStore . setCurrentRequestVerifyContext ( verifyContext ) ;
4749
@@ -97,7 +99,175 @@ export default function useWalletKitEventsManager(initialized: boolean) {
9799 * Set up WalletKit event listeners
98100 *****************************************************************************/
99101 useEffect ( ( ) => {
100- if ( initialized ) {
102+ if ( initialized && walletKit ) {
103+ // ModalStore.open('SessionSendTransactionModal', {
104+ // requestEvent: {
105+ // id: 1734344941527167,
106+ // topic:
107+ // '3cb5a65c0c87fffa21b19a3772ca6117040c80c4f4bd0e729c417ad1d119ea48',
108+ // params: {
109+ // request: {
110+ // method: 'eth_sendTransaction',
111+ // params: [
112+ // {
113+ // data: '0xa9059cbb00000000000000000000000013a2ff792037aa2cd77fe1f4b522921ac59a9c5200000000000000000000000000000000000000000000000000000000001e8480',
114+ // from: '0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
115+ // to: '0x0b2c639c533813f4aa9d7837caf62653d097ff85',
116+ // },
117+ // ],
118+ // expiryTimestamp: 1734345241,
119+ // },
120+ // chainId: 'eip155:10',
121+ // },
122+ // verifyContext: {
123+ // verified: {
124+ // verifyUrl: 'https://verify.walletconnect.org',
125+ // validation: 'VALID',
126+ // origin: 'https://appkit-lab.reown.com',
127+ // isScam: null,
128+ // },
129+ // },
130+ // },
131+ // requestSession: {
132+ // relay: {
133+ // protocol: 'irn',
134+ // },
135+ // namespaces: {
136+ // eip155: {
137+ // chains: [
138+ // 'eip155:1',
139+ // 'eip155:10',
140+ // 'eip155:137',
141+ // 'eip155:324',
142+ // 'eip155:42161',
143+ // 'eip155:8453',
144+ // 'eip155:100',
145+ // 'eip155:1313161554',
146+ // ],
147+ // methods: [
148+ // 'personal_sign',
149+ // 'eth_sign',
150+ // 'eth_signTransaction',
151+ // 'eth_signTypedData',
152+ // 'eth_signTypedData_v3',
153+ // 'eth_signTypedData_v4',
154+ // 'eth_sendRawTransaction',
155+ // 'eth_sendTransaction',
156+ // ],
157+ // events: ['accountsChanged', 'chainChanged'],
158+ // accounts: [
159+ // 'eip155:1:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
160+ // 'eip155:10:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
161+ // 'eip155:137:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
162+ // 'eip155:324:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
163+ // 'eip155:42161:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
164+ // 'eip155:8453:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
165+ // 'eip155:100:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
166+ // 'eip155:1313161554:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
167+ // ],
168+ // },
169+ // },
170+ // controller:
171+ // 'ea8f2172d22ace9801b2178a9f55b0053c9ac63d1f5a7d2bc4b79ec84d91244a',
172+ // expiry: 1734080914,
173+ // topic:
174+ // 'f013d8008bf88c77d78f64548f4103d6ec677254f8a9ba89366d5368a79334b0',
175+ // requiredNamespaces: {},
176+ // optionalNamespaces: {
177+ // eip155: {
178+ // methods: [
179+ // 'personal_sign',
180+ // 'eth_sign',
181+ // 'eth_signTransaction',
182+ // 'eth_signTypedData',
183+ // 'eth_signTypedData_v3',
184+ // 'eth_signTypedData_v4',
185+ // 'eth_sendRawTransaction',
186+ // 'eth_sendTransaction',
187+ // 'wallet_getCapabilities',
188+ // 'wallet_sendCalls',
189+ // 'wallet_showCallsStatus',
190+ // 'wallet_getCallsStatus',
191+ // 'wallet_grantPermissions',
192+ // 'wallet_revokePermissions',
193+ // 'wallet_switchEthereumChain',
194+ // ],
195+ // events: ['accountsChanged', 'chainChanged'],
196+ // chains: [
197+ // 'eip155:1',
198+ // 'eip155:10',
199+ // 'eip155:137',
200+ // 'eip155:324',
201+ // 'eip155:42161',
202+ // 'eip155:8453',
203+ // 'eip155:84532',
204+ // 'eip155:1301',
205+ // 'eip155:11155111',
206+ // 'eip155:100',
207+ // 'eip155:295',
208+ // 'eip155:1313161554',
209+ // 'eip155:5000',
210+ // ],
211+ // rpcMap: {
212+ // '1': 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A1&projectId=702e2d45d9debca66795614cddb5c1ca',
213+ // '10': 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A10&projectId=702e2d45d9debca66795614cddb5c1ca',
214+ // '100':
215+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A100&projectId=702e2d45d9debca66795614cddb5c1ca',
216+ // '137':
217+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A137&projectId=702e2d45d9debca66795614cddb5c1ca',
218+ // '295': 'https://mainnet.hashio.io/api',
219+ // '324':
220+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A324&projectId=702e2d45d9debca66795614cddb5c1ca',
221+ // '1301':
222+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A1301&projectId=702e2d45d9debca66795614cddb5c1ca',
223+ // '5000':
224+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A5000&projectId=702e2d45d9debca66795614cddb5c1ca',
225+ // '8453':
226+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A8453&projectId=702e2d45d9debca66795614cddb5c1ca',
227+ // '42161':
228+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A42161&projectId=702e2d45d9debca66795614cddb5c1ca',
229+ // '84532':
230+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A84532&projectId=702e2d45d9debca66795614cddb5c1ca',
231+ // '11155111':
232+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A11155111&projectId=702e2d45d9debca66795614cddb5c1ca',
233+ // '1313161554':
234+ // 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A1313161554&projectId=702e2d45d9debca66795614cddb5c1ca',
235+ // },
236+ // },
237+ // },
238+ // pairingTopic:
239+ // 'c0d67be3a41ded5ffa144e8ed6281a057e1e8e9f23003a427c1a70d04a5939f6',
240+ // acknowledged: true,
241+ // self: {
242+ // publicKey:
243+ // 'ea8f2172d22ace9801b2178a9f55b0053c9ac63d1f5a7d2bc4b79ec84d91244a',
244+ // metadata: {
245+ // name: 'React Native Wallet Example',
246+ // description: 'React Native WalletKit by Reown',
247+ // url: 'https://reown.com/walletkit',
248+ // icons: ['https://avatars.githubusercontent.com/u/179229932'],
249+ // redirect: {
250+ // native: 'rn-web3wallet://',
251+ // universal: 'https://appkit-lab.reown.com/rn_walletkit',
252+ // linkMode: true,
253+ // },
254+ // },
255+ // },
256+ // peer: {
257+ // publicKey:
258+ // '9dc9524bd9f09fb0e387729354099c686086757701e417815f73a168c4f31565',
259+ // metadata: {
260+ // name: 'AppKit Lab',
261+ // description:
262+ // 'Explore the AppKit Lab to test the latest AppKit features.',
263+ // url: 'https://appkit-lab.reown.com',
264+ // icons: ['https://appkit-lab.reown.com/favicon.svg'],
265+ // },
266+ // },
267+ // transportType: 'relay',
268+ // },
269+ // });
270+
101271 //sign
102272 walletKit . on ( 'session_proposal' , onSessionProposal ) ;
103273 walletKit . on ( 'session_request' , onSessionRequest ) ;
0 commit comments