Skip to content

Commit 2b9323a

Browse files
tooltips
1 parent ce1468f commit 2b9323a

File tree

4 files changed

+28
-10
lines changed

4 files changed

+28
-10
lines changed

apps/dashboard/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,4 @@ STRIPE_SECRET_KEY=""
108108

109109
# required for server wallet management
110110
NEXT_PUBLIC_THIRDWEB_VAULT_URL=""
111+
NEXT_PUBLIC_ENGINE_CLOUD_URL=""

apps/dashboard/src/@/constants/env.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export const DASHBOARD_THIRDWEB_SECRET_KEY =
77
export const THIRDWEB_VAULT_URL =
88
process.env.NEXT_PUBLIC_THIRDWEB_VAULT_URL || "";
99

10+
export const THIRDWEB_ENGINE_CLOUD_URL =
11+
process.env.NEXT_PUBLIC_ENGINE_CLOUD_URL || "";
12+
1013
export const THIRDWEB_API_SECRET = process.env.API_SERVER_SECRET || "";
1114

1215
export const IPFS_GATEWAY_URL =

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

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,6 @@ export default function CreateServerWallet(props: {
334334
throw new Error("Failed to create eoa");
335335
}
336336

337-
console.log(JSON.stringify(eoa.data, null, 2));
338-
339337
router.refresh();
340338

341339
return eoa;
@@ -401,15 +399,15 @@ export default function CreateServerWallet(props: {
401399
<Alert variant="destructive">
402400
<AlertTitle>Secure your keys</AlertTitle>
403401
<AlertDescription>
404-
These keys cannot be recovered. Store them securely as they
405-
provide access to your wallet.
402+
These keys will not be displayed again. Store them securely
403+
as they provide access to your server wallets.
406404
</AlertDescription>
407405
</Alert>
408406

409407
<div className="space-y-4">
410408
<div>
411409
<h3 className="mb-2 font-medium text-sm">Admin Key</h3>
412-
<div className="rounded-lg border bg-card p-3">
410+
<div className="flex flex-col gap-2 rounded-lg border bg-card p-3">
413411
<CopyTextButton
414412
textToCopy={
415413
initialiseProjectWithVaultMutation.data.serviceAccount
@@ -423,12 +421,16 @@ export default function CreateServerWallet(props: {
423421
copyIconPosition="right"
424422
tooltip="Copy Admin Key"
425423
/>
424+
<p className="text-muted-foreground text-xs">
425+
This key is used to create or modify your server
426+
wallets. Save it in a secure location.
427+
</p>
426428
</div>
427429
</div>
428430

429431
<div>
430432
<h3 className="mb-2 font-medium text-sm">Rotation Code</h3>
431-
<div className="rounded-lg border bg-card p-3">
433+
<div className="flex flex-col gap-2 rounded-lg border bg-card p-3">
432434
<CopyTextButton
433435
textToCopy={
434436
initialiseProjectWithVaultMutation.data.serviceAccount
@@ -442,12 +444,16 @@ export default function CreateServerWallet(props: {
442444
copyIconPosition="right"
443445
tooltip="Copy Rotation Code"
444446
/>
447+
<p className="text-muted-foreground text-xs">
448+
This code is used to rotate your admin key in case you
449+
loose it. Save it in a secure location.
450+
</p>
445451
</div>
446452
</div>
447453

448454
<div>
449455
<h3 className="mb-2 font-medium text-sm">Access Token</h3>
450-
<div className="rounded-lg border bg-card p-3">
456+
<div className="flex flex-col gap-2 rounded-lg border bg-card p-3">
451457
<CopyTextButton
452458
textToCopy={
453459
initialiseProjectWithVaultMutation.data
@@ -461,6 +467,11 @@ export default function CreateServerWallet(props: {
461467
copyIconPosition="right"
462468
tooltip="Copy Access Token"
463469
/>
470+
<p className="text-muted-foreground text-xs">
471+
This access token is used to send transactions to the
472+
blockchain from your backend. Can be revoked and
473+
recreated with your admin key.
474+
</p>
464475
</div>
465476
</div>
466477
</div>

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
import { Button } from "@/components/ui/button";
22
import { CodeServer } from "../../../../../../../@/components/ui/code/code.server";
3+
import { THIRDWEB_ENGINE_CLOUD_URL } from "../../../../../../../@/constants/env";
34

45
export function TryItOut() {
56
return (
67
<div className="flex flex-col gap-6 overflow-hidden rounded-lg border border-border bg-card p-6">
78
<div className="flex flex-row items-center gap-4">
89
<div className="flex flex-1 flex-col gap-4 rounded-lg rounded-b-none lg:flex-row lg:justify-between">
910
<div>
10-
<h2 className="font-semibold text-xl tracking-tight">Usage</h2>
11+
<h2 className="font-semibold text-xl tracking-tight">
12+
Usage from your backend
13+
</h2>
1114
<p className="text-muted-foreground text-sm">
12-
Simple http API to send transactions to the blockchain
15+
Send transactions to the blockchain using a simple http API
1316
</p>
1417
</div>
1518
</div>
@@ -26,7 +29,7 @@ export function TryItOut() {
2629
);
2730
}
2831
const typescriptCodeExample = () => `\
29-
const response = fetch("https://wallet.thirdweb.com/v1/account/send-transaction", {
32+
const response = fetch("${THIRDWEB_ENGINE_CLOUD_URL}/account/send-transaction", {
3033
method: "POST",
3134
headers: {
3235
"Content-Type": "application/json",

0 commit comments

Comments
 (0)