Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/portal/src/app/typescript/v5/auth/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions apps/portal/src/app/typescript/v5/getting-started/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand All @@ -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);
Expand Down
Loading