File tree Expand file tree Collapse file tree 7 files changed +17
-13
lines changed
apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine Expand file tree Collapse file tree 7 files changed +17
-13
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 11import { getProject } from "@/api/projects" ;
22import { getTeamBySlug } from "@/api/team" ;
3- import { listEoas } from "@thirdweb-dev/vault-sdk" ;
3+ import { THIRDWEB_VAULT_URL } from "@/constants/env" ;
4+ import { createVaultClient , listEoas } from "@thirdweb-dev/vault-sdk" ;
45import { notFound , redirect } from "next/navigation" ;
56import { getAuthToken } from "../../../../api/lib/getAuthToken" ;
67import { TransactionsAnalyticsPageContent } from "./analytics/analytics-page" ;
78import { TransactionAnalyticsSummary } from "./analytics/summary" ;
8- import { initVaultClient } from "./lib/vault-utils" ;
99import type { Wallet } from "./server-wallets/wallet-table/types" ;
1010
1111export default async function TransactionsAnalyticsPage ( props : {
@@ -44,7 +44,9 @@ export default async function TransactionsAnalyticsPage(props: {
4444 ( service ) => service . name === "engineCloud" ,
4545 ) ;
4646
47- const vaultClient = await initVaultClient ( ) ;
47+ const vaultClient = await createVaultClient ( {
48+ baseUrl : THIRDWEB_VAULT_URL ,
49+ } ) ;
4850
4951 const managementAccessToken =
5052 projectEngineCloudService ?. managementAccessToken ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
2323 createWalletAccessToken ,
2424 initVaultClient ,
2525 maskSecret ,
26- } from "../../lib/vault-utils " ;
26+ } from "../../lib/vault.client " ;
2727
2828export default function CreateServerWallet ( props : {
2929 project : Project ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import {
3030 SERVER_WALLET_MANAGEMENT_ACCESS_TOKEN_PURPOSE ,
3131 createWalletAccessToken ,
3232 initVaultClient ,
33- } from "../../lib/vault-utils " ;
33+ } from "../../lib/vault.client " ;
3434
3535export default function ListAccessTokensButton ( props : {
3636 project : Project ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import {
2424 createManagementAccessToken ,
2525 initVaultClient ,
2626 maskSecret ,
27- } from "../../lib/vault-utils " ;
27+ } from "../../lib/vault.client " ;
2828
2929export default function RotateAdminKeyButton ( props : { project : Project } ) {
3030 const [ modalOpen , setModalOpen ] = useState ( false ) ;
Original file line number Diff line number Diff line change @@ -64,20 +64,20 @@ const response = fetch(
6464 headers: {
6565 "Content-Type": "application/json",
6666 "x-secret-key": "<your-project-secret-key>",
67- "x-vault-access-token": "<your-wallet -access-token>",
67+ "x-vault-access-token": "<your-vault -access-token>",
6868
6969 },
7070 body: JSON.stringify({
7171 "executionOptions": {
7272 "type": "AA",
73- "signerAddress": "<your-server-wallet -address>",
73+ "signerAddress": "<your-signer -address>",
7474 "chainId": "84532"
7575 },
7676 "params": [
7777 {
7878 "contractAddress": "0x...",
79- "method": "approve ",
80- "params": ["0x...", "0 "],
79+ "method": "function mintTo(address to, uint256 amount) ",
80+ "params": ["0x...", "100 "],
8181 },
8282 ],
8383 }),
Original file line number Diff line number Diff line change 11import { getProject } from "@/api/projects" ;
2- import { listEoas } from "@thirdweb-dev/vault-sdk" ;
2+ import { createVaultClient , listEoas } from "@thirdweb-dev/vault-sdk" ;
33import { notFound } from "next/navigation" ;
4+ import { THIRDWEB_VAULT_URL } from "../../../../../../@/constants/env" ;
45import { getAuthToken } from "../../../../../api/lib/getAuthToken" ;
5- import { initVaultClient } from "../lib/vault-utils" ;
66import { KeyManagement } from "./components/key-management" ;
77import { TryItOut } from "./components/try-it-out" ;
88import type { Wallet } from "./wallet-table/types" ;
@@ -11,7 +11,9 @@ import { ServerWalletsTable } from "./wallet-table/wallet-table";
1111export default async function TransactionsServerWalletsPage ( props : {
1212 params : Promise < { team_slug : string ; project_slug : string } > ;
1313} ) {
14- const vaultClient = await initVaultClient ( ) ;
14+ const vaultClient = await createVaultClient ( {
15+ baseUrl : THIRDWEB_VAULT_URL ,
16+ } ) ;
1517
1618 const { team_slug, project_slug } = await props . params ;
1719 const [ authToken , project ] = await Promise . all ( [
You can’t perform that action at this time.
0 commit comments