File tree Expand file tree Collapse file tree
apps/portal/src/app/typescript/v5 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ import { privateKeyToAccount } from "thirdweb/wallets";
4242
4343const privateKey = process .env .THIRDWEB_PRIVATE_KEY ;
4444const thirdwebClient = createThirdwebClient ({
45- secretKey: process .env .THIRDWEB_SECRET_KEY ;
45+ secretKey: process .env .THIRDWEB_SECRET_KEY ,
4646});
4747
4848const auth = createAuth ({
4949 domain: " localhost:3000" ,
5050 client: thirdwebClient ,
51- adminAccount: privateKeyToAccount ({client , privateKey })
51+ adminAccount: privateKeyToAccount ({ client: thirdwebClient , privateKey }),
5252});
5353
5454// 1. generate a login payload for a client on the server side
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ import { inAppWallet } from "thirdweb/wallets"
8181// create or access a wallet
8282 const wallet = inAppWallet ();
8383const account = await wallet .connect ({
84- client: TEST_CLIENT ,
84+ client ,
8585 strategy: " backend" , // we use backend strategy to generate a wallet from a secret key
8686 walletSecret: " my-test-wallet-secret" , // use this secret to access the same wallet across multiple scripts
8787});
@@ -102,7 +102,8 @@ import { getWalletBalance } from "thirdweb/wallets";
102102
103103// Get the balance of the account
104104const balance = await getWalletBalance ({
105- account ,
105+ client ,
106+ address: account .address ,
106107 chain: sepolia ,
107108});
108109console .log (" Balance:" , balance .displayValue , balance .symbol );
You can’t perform that action at this time.
0 commit comments