From 85754fa516a7cd75fb194300b85377bd5db62bfb Mon Sep 17 00:00:00 2001 From: TanmayDagur Date: Thu, 16 Jul 2026 17:13:28 +0530 Subject: [PATCH] docs(portal): fix syntax and compilation errors in v5 guide snippets --- apps/portal/src/app/typescript/v5/auth/page.mdx | 4 ++-- apps/portal/src/app/typescript/v5/getting-started/page.mdx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/portal/src/app/typescript/v5/auth/page.mdx b/apps/portal/src/app/typescript/v5/auth/page.mdx index 50f634c0f9c..2b289491092 100644 --- a/apps/portal/src/app/typescript/v5/auth/page.mdx +++ b/apps/portal/src/app/typescript/v5/auth/page.mdx @@ -42,13 +42,13 @@ import { privateKeyToAccount } from "thirdweb/wallets"; const privateKey = process.env.THIRDWEB_PRIVATE_KEY; const thirdwebClient = createThirdwebClient({ - secretKey: process.env.THIRDWEB_SECRET_KEY; + secretKey: process.env.THIRDWEB_SECRET_KEY, }); const auth = createAuth({ domain: "localhost:3000", client: thirdwebClient, - adminAccount: privateKeyToAccount({client, privateKey}) + adminAccount: privateKeyToAccount({ client: thirdwebClient, privateKey }), }); // 1. generate a login payload for a client on the server side diff --git a/apps/portal/src/app/typescript/v5/getting-started/page.mdx b/apps/portal/src/app/typescript/v5/getting-started/page.mdx index 8291ee76362..f8c7b7b2894 100644 --- a/apps/portal/src/app/typescript/v5/getting-started/page.mdx +++ b/apps/portal/src/app/typescript/v5/getting-started/page.mdx @@ -81,7 +81,7 @@ import { inAppWallet } from "thirdweb/wallets" // create or access a wallet const wallet = inAppWallet(); const account = await wallet.connect({ - client: TEST_CLIENT, + client, strategy: "backend", // we use backend strategy to generate a wallet from a secret key walletSecret: "my-test-wallet-secret", // use this secret to access the same wallet across multiple scripts }); @@ -102,7 +102,8 @@ import { getWalletBalance } from "thirdweb/wallets"; // Get the balance of the account const balance = await getWalletBalance({ - account, + client, + address: account.address, chain: sepolia, }); console.log("Balance:", balance.displayValue, balance.symbol);