Skip to content

Commit 9d6e1d9

Browse files
basic tx detail UI
1 parent bb08e7b commit 9d6e1d9

File tree

3 files changed

+395
-12
lines changed

3 files changed

+395
-12
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/analytics/tx-table/types.ts

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,50 @@ export type Transaction = {
6666
transactionHash: Hex | null;
6767
confirmedAt: Date | null;
6868
confirmedAtBlockNumber: string | null;
69-
// enrichedData: EnrichedDataItem[];
69+
enrichedData: unknown[];
7070
executionParams: ExecutionParamsSerialized;
7171
executionResult: ExecutionResultSerialized | null;
7272
createdAt: Date;
7373
errorMessage: string | null;
7474
cancelledAt: Date | null;
7575
};
7676

77-
export type TransactionStatus = ExecutionResultSerialized["status"];
77+
export type TransactionStatus =
78+
| "QUEUED"
79+
| "SUBMITTED"
80+
| "CONFIRMED"
81+
| "REVERTED";
82+
83+
export type TransactionParam = {
84+
to: string;
85+
data: string;
86+
value: string;
87+
};
88+
89+
export type ExecutionParams = {
90+
type: string;
91+
signerAddress: string;
92+
entrypointAddress: string;
93+
smartAccountAddress: string;
94+
};
95+
96+
export type ExecutionResult = {
97+
status: TransactionStatus;
98+
nonce?: string;
99+
userOpHash?: string;
100+
actualGasCost?: string;
101+
actualGasUsed?: string;
102+
onchainStatus?: string;
103+
transactionHash?: string;
104+
};
105+
106+
export type Pagination = {
107+
totalCount: string;
108+
page: number;
109+
limit: number;
110+
};
78111

79112
export type TransactionsResponse = {
80113
transactions: Transaction[];
81-
pagination: {
82-
limit: number;
83-
page: number;
84-
totalCount: number;
85-
};
114+
pagination: Pagination;
86115
};

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/tx/[id]/page.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getProject } from "@/api/projects";
2-
import { CodeServer } from "@/components/ui/code/code.server";
32
import { notFound, redirect } from "next/navigation";
43
import { getSingleTransaction } from "../../lib/analytics";
4+
import { TransactionDetailsUI } from "./transaction-details-ui";
55

66
export default async function TransactionPage({
77
params,
@@ -27,10 +27,12 @@ export default async function TransactionPage({
2727
}
2828

2929
return (
30-
<div className="p-4">
31-
<h1 className="mb-4 font-bold text-2xl">Transaction Details</h1>
32-
{/* TODO: add transaction details UI */}
33-
<CodeServer lang="json" code={JSON.stringify(transactionData, null, 2)} />
30+
<div className="space-y-6 p-2">
31+
<TransactionDetailsUI
32+
transaction={transactionData}
33+
teamSlug={team_slug}
34+
project={project}
35+
/>
3436
</div>
3537
);
3638
}

0 commit comments

Comments
 (0)