Skip to content

Commit 7d1290e

Browse files
fix SSR
1 parent fd30474 commit 7d1290e

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
lines changed

apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { getProject } from "@/api/projects";
22
import { 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";
45
import { notFound, redirect } from "next/navigation";
56
import { getAuthToken } from "../../../../api/lib/getAuthToken";
67
import { TransactionsAnalyticsPageContent } from "./analytics/analytics-page";
78
import { TransactionAnalyticsSummary } from "./analytics/summary";
8-
import { initVaultClient } from "./lib/vault-utils";
99
import type { Wallet } from "./server-wallets/wallet-table/types";
1010

1111
export 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;

apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine/server-wallets/components/create-server-wallet.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
createWalletAccessToken,
2424
initVaultClient,
2525
maskSecret,
26-
} from "../../lib/vault-utils";
26+
} from "../../lib/vault.client";
2727

2828
export default function CreateServerWallet(props: {
2929
project: Project;

apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine/server-wallets/components/list-access-tokens.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

3535
export default function ListAccessTokensButton(props: {
3636
project: Project;

apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine/server-wallets/components/rotate-admin-key.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
createManagementAccessToken,
2525
initVaultClient,
2626
maskSecret,
27-
} from "../../lib/vault-utils";
27+
} from "../../lib/vault.client";
2828

2929
export default function RotateAdminKeyButton(props: { project: Project }) {
3030
const [modalOpen, setModalOpen] = useState(false);

apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine/server-wallets/components/try-it-out.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}),

apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine/server-wallets/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { getProject } from "@/api/projects";
2-
import { listEoas } from "@thirdweb-dev/vault-sdk";
2+
import { createVaultClient, listEoas } from "@thirdweb-dev/vault-sdk";
33
import { notFound } from "next/navigation";
4+
import { THIRDWEB_VAULT_URL } from "../../../../../../@/constants/env";
45
import { getAuthToken } from "../../../../../api/lib/getAuthToken";
5-
import { initVaultClient } from "../lib/vault-utils";
66
import { KeyManagement } from "./components/key-management";
77
import { TryItOut } from "./components/try-it-out";
88
import type { Wallet } from "./wallet-table/types";
@@ -11,7 +11,9 @@ import { ServerWalletsTable } from "./wallet-table/wallet-table";
1111
export 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([

0 commit comments

Comments
 (0)