Skip to content

Commit 44d7f6e

Browse files
fix types
1 parent 7acf778 commit 44d7f6e

File tree

2 files changed

+7
-52
lines changed

2 files changed

+7
-52
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/analytics/send-test-tx.client.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ export function SendTestTransaction(props: {
7777
},
7878
body: JSON.stringify({
7979
executionOptions: {
80-
type: "AA",
81-
signerAddress: args.walletAddress,
80+
from: args.walletAddress,
8281
chainId: args.chainId.toString(),
8382
},
8483
params: [

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/lib/analytics.ts

Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { THIRDWEB_ENGINE_CLOUD_URL } from "@/constants/env";
22
import type { TransactionStats } from "../../../../../../../../types/analytics";
33
import { getAuthToken } from "../../../../../../api/lib/getAuthToken";
4-
import type { Address, Hex } from "thirdweb";
4+
import type {
5+
Transaction,
6+
TransactionsResponse,
7+
} from "../analytics/tx-table/types";
58

69
// Define the structure of the data we expect back from our fetch function
710
export type TransactionSummaryData = {
@@ -147,53 +150,6 @@ export async function getTransactionsChart({
147150
}));
148151
}
149152

150-
type TransactionParam = {
151-
to: Address;
152-
data: Hex;
153-
value: string;
154-
};
155-
156-
type ExecutionParams = {
157-
type: string;
158-
signerAddress: string;
159-
entrypointAddress: string;
160-
smartAccountAddress: string;
161-
};
162-
163-
type ExecutionResult = {
164-
status: string;
165-
};
166-
167-
type Transaction = {
168-
id: string;
169-
batchIndex: number;
170-
chainId: string;
171-
from: Address;
172-
transactionParams: TransactionParam[];
173-
transactionHash: Hex | null;
174-
confirmedAt: string | null;
175-
confirmedAtBlockNumber: number | null;
176-
enrichedData: unknown[];
177-
executionParams: ExecutionParams;
178-
executionResult: ExecutionResult;
179-
createdAt: string;
180-
errorMessage: string | null;
181-
cancelledAt: string | null;
182-
};
183-
184-
type Pagination = {
185-
totalCount: string;
186-
page: number;
187-
limit: number;
188-
};
189-
190-
type TransactionsSearchResponse = {
191-
result: {
192-
transactions: Transaction[];
193-
pagination: Pagination;
194-
};
195-
};
196-
197153
export async function getSingleTransaction({
198154
teamId,
199155
clientId,
@@ -240,7 +196,7 @@ export async function getSingleTransaction({
240196
);
241197
}
242198

243-
const data = (await response.json()) as TransactionsSearchResponse;
199+
const data = (await response.json()).result as TransactionsResponse;
244200

245-
return data.result.transactions[0];
201+
return data.transactions[0];
246202
}

0 commit comments

Comments
 (0)