File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
content/00.zksync-era/30.unique-features/30.zksync-sso Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -191,8 +191,7 @@ type ConstraintCondition =
191191
192192## Paymasters
193193
194- General paymasters are supported with sessions.
195- Approval-based paymasters are not yet supported.
194+ Paymasters can be used to pay for the session transaction fees.
196195
197196``` ts
198197const transactionHash = await writeContract (wagmiConfig , {
Original file line number Diff line number Diff line change @@ -86,6 +86,14 @@ Just 2 steps:
8686 }),
8787 ],
8888 },
89+ // Optional: Receive notifications about session state changes
90+ onSessionStateChange: ({ state, address, chainId }) => {
91+ console.log(` Session state for address ${address} changed: ${state.type} - ${state.message} ` );
92+
93+ // Use this to notify users and restart the session if needed
94+ // - Session expired: state.type === ' session_expired'
95+ // - Session inactive (e.g. was revoked): state.type === ' session_inactive'
96+ },
8997 });
9098
9199 const wagmiConfig = createConfig({
@@ -149,6 +157,15 @@ Just 2 steps:
149157 }),
150158 ],
151159 },
160+
161+ // Optional: Receive notifications about session state changes
162+ onSessionStateChange: ({ state, address, chainId }) => {
163+ console.log(` Session state for address ${address} changed: ${state.type} - ${state.message} ` );
164+
165+ // Use this to notify users and restart the session if needed
166+ // - Session expired: state.type === ' session_expired'
167+ // - Session inactive (e.g. was revoked): state.type === ' session_inactive'
168+ },
152169 });
153170
154171 const wagmiConfig = defaultWagmiConfig({
You can’t perform that action at this time.
0 commit comments