Skip to content

Commit dccd92b

Browse files
lint
1 parent 31fb806 commit dccd92b

File tree

1 file changed

+7
-2
lines changed
  • apps/portal/src/app/engine/v3/guides/session-keys

1 file changed

+7
-2
lines changed

apps/portal/src/app/engine/v3/guides/session-keys/page.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import {
1818
generateAccount,
1919
smartWallet,
2020
sendTransaction,
21-
getContract
21+
getContract,
22+
createThirdwebClient
2223
} from "thirdweb";
2324
import { sepolia } from "thirdweb/chains";
2425
import { getAllActiveSigners } from "thirdweb/extensions/erc4337";
@@ -39,7 +40,7 @@ const targetAddress = "0x..."; // Replace with your target address
3940

4041
## Step 1: Configure User Smart Wallet with Session Key
4142

42-
The first step is to add our session key address as a signer to the user's smart account. This can be done by configuring the smart wallet with the session key address and permissions.
43+
The first step is to add our session key address as a signer to the user's smart account. This is typically done on the client side since it needs explicit user approval. This can be done by configuring the smart wallet with the session key address and permissions.
4344

4445
In a React application, this can be done by using the `ConnectButton` or `ConnectEmbed` component. This will automatically configure the smart wallet with the session key address and permissions.
4546

@@ -49,6 +50,10 @@ In a React application, this can be done by using the `ConnectButton` or `Connec
4950
chain: sepolia,
5051
sessionKey: {
5152
address: sessionKeyAccountAddress,
53+
permissions: {
54+
// "*" allows all targets, or specify specific contract addresses
55+
approvedTargets: "*",
56+
},
5257
},
5358
sponsorGas: true,
5459
}}

0 commit comments

Comments
 (0)