Skip to content

Commit 60b6b28

Browse files
committed
Merge branch 'main' into firekeeper/wallets-dashboard-revamp
2 parents 6baeb51 + f6f138c commit 60b6b28

File tree

99 files changed

+1133
-632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1133
-632
lines changed

.changeset/open-icons-start.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/dashboard/framer-rewrites.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = [
1010
"/wallets",
1111
"/account-abstraction",
1212
"/payments",
13-
"/payments/x402",
13+
"/x402",
1414
"/nexus",
1515
"/auth",
1616
"/in-app-wallets",

apps/dashboard/redirects.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,11 @@ async function redirects() {
479479
destination: "/tokens",
480480
permanent: false,
481481
},
482+
{
483+
source: "/payments/x402",
484+
destination: "/x402",
485+
permanent: false,
486+
},
482487
];
483488
}
484489

apps/dashboard/src/@/api/team/ecosystems.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export type AuthOption =
2121
| "steam"
2222
| "apple"
2323
| "coinbase"
24-
| "line";
24+
| "line"
25+
| "epic";
2526

2627
export type Ecosystem = {
2728
name: string;

apps/dashboard/src/@/utils/faucet.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const customClaimAmounts: Record<number, number> = {
77
531050104: 5,
88
// Arc testnet
99
5042002: 1,
10+
// Injective testnet
11+
1439: 1,
1012
};
1113

1214
const defaultClaimAmount = 0.01;

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import {
1010
CircleXIcon,
1111
} from "lucide-react";
1212
import Link from "next/link";
13-
import { NATIVE_TOKEN_ADDRESS, type ThirdwebClient } from "thirdweb";
13+
import {
14+
getAddress,
15+
NATIVE_TOKEN_ADDRESS,
16+
type ThirdwebClient,
17+
} from "thirdweb";
1418
import type { Status, Token } from "thirdweb/bridge";
1519
import { status } from "thirdweb/bridge";
1620
import { toTokens } from "thirdweb/utils";
@@ -123,6 +127,8 @@ function TokenInfo(props: {
123127
const isNativeToken =
124128
props.token.address.toLowerCase() === NATIVE_TOKEN_ADDRESS.toLowerCase();
125129

130+
const tokenAddress = getAddress(props.token.address);
131+
126132
return (
127133
<div className="flex-1 pt-10 pb-9 px-6 lg:px-8">
128134
<div className="flex justify-between items-center">
@@ -206,7 +212,7 @@ function TokenInfo(props: {
206212
<div className="space-y-1">
207213
<p className="text-sm text-foreground ">{props.addressLabel}</p>
208214
<WalletAddress
209-
address={props.walletAddress}
215+
address={getAddress(props.walletAddress)}
210216
client={props.client}
211217
className="py-0.5 h-auto text-sm [&>*]:!font-sans tabular-nums [&>*]:font-normal text-muted-foreground hover:text-foreground"
212218
iconClassName="size-3"
@@ -222,8 +228,8 @@ function TokenInfo(props: {
222228
? `/${chainQuery.data?.slug || props.token.chainId}`
223229
: `/${chainQuery.data?.slug || props.token.chainId}/${props.token.address}`
224230
}
225-
textToShow={props.token.address}
226-
textToCopy={props.token.address}
231+
textToShow={tokenAddress}
232+
textToCopy={tokenAddress}
227233
copyTooltip="Copy Token Address"
228234
className="-translate-x-1"
229235
/>

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
Clock4Icon,
99
InfoIcon,
1010
} from "lucide-react";
11-
import { toTokens } from "thirdweb";
11+
import { getAddress, toTokens } from "thirdweb";
1212
import { status } from "thirdweb/bridge";
1313
import type { ChainMetadata } from "thirdweb/chains";
1414
import {
@@ -153,6 +153,9 @@ function GeneericTxDetails(props: {
153153

154154
const timestamp = getDatefromTimestamp(block.timestamp);
155155

156+
const fromAddress = getAddress(transaction.from);
157+
const toAddress = transaction.to ? getAddress(transaction.to) : undefined;
158+
156159
return (
157160
<div className="border rounded-xl p-4 lg:p-6 bg-card">
158161
{/* section 1 */}
@@ -216,23 +219,23 @@ function GeneericTxDetails(props: {
216219
<section className="border-b py-6 space-y-5 lg:space-y-3">
217220
<GridItem label="From" tooltip="The sending party of the transaction.">
218221
<CopyTextButton
219-
textToCopy={transaction.from}
220-
textToShow={transaction.from}
222+
textToCopy={fromAddress}
223+
textToShow={fromAddress}
221224
tooltip="Copy from address"
222225
variant="ghost"
223226
copyIconPosition="right"
224227
className="truncate -translate-x-1.5 max-w-full"
225228
/>
226229
</GridItem>
227230

228-
{transaction.to && (
231+
{toAddress && (
229232
<GridItem
230233
label="Interacted with (To)"
231234
tooltip="The receiving party of the transaction (could be a contract address)."
232235
>
233236
<CopyTextButton
234-
textToCopy={transaction.to}
235-
textToShow={transaction.to}
237+
textToCopy={toAddress}
238+
textToShow={toAddress}
236239
tooltip="Copy to address"
237240
variant="ghost"
238241
copyIconPosition="right"

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/client/auth-options-form.client.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const authOptions = [
5858
"apple",
5959
"coinbase",
6060
"line",
61+
"epic",
6162
] as const satisfies AuthOption[];
6263

6364
type AuthOptionsFormData = {
Lines changed: 81 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,95 @@
1-
import { ResponsiveSearchParamsProvider } from "responsive-rsc";
1+
"use client";
2+
import { useQuery } from "@tanstack/react-query";
3+
import { Spinner } from "@workspace/ui/components/spinner";
24
import type { ThirdwebClient } from "thirdweb";
35
import type { Project } from "@/api/project/projects";
46
import { UnifiedTransactionsTable } from "../components/transactions-table.client";
7+
import { getTransactionAnalyticsSummary } from "../lib/analytics-summary.client";
58
import type { Wallet } from "../server-wallets/wallet-table/types";
6-
import { TransactionAnalyticsFilter } from "./filter";
7-
import { TransactionsChartCard } from "./tx-chart/tx-chart";
9+
import type { SolanaWallet } from "../solana-wallets/wallet-table/types";
10+
import { EngineChecklist } from "./ftux.client";
11+
import { TransactionAnalyticsSummary } from "./summary";
12+
import { TransactionsAnalytics } from "./tx-chart/tx-chart";
813

914
export function TransactionsAnalyticsPageContent(props: {
10-
searchParams: {
11-
from?: string | undefined | string[];
12-
to?: string | undefined | string[];
13-
interval?: string | undefined | string[];
14-
};
1515
project: Project;
1616
showAnalytics: boolean;
17-
wallets?: Wallet[];
17+
wallets: Wallet[];
1818
teamSlug: string;
1919
client: ThirdwebClient;
20+
authToken: string;
21+
teamId: string;
22+
isManagedVault: boolean;
23+
testTxWithWallet: string | undefined;
24+
testSolanaTxWithWallet: string | undefined;
25+
solanaWallets: SolanaWallet[];
2026
}) {
21-
return (
22-
<ResponsiveSearchParamsProvider value={props.searchParams}>
23-
<div className="flex grow flex-col gap-6">
24-
{props.showAnalytics && (
25-
<>
26-
<div className="flex justify-end">
27-
<TransactionAnalyticsFilter />
28-
</div>
29-
<TransactionsChartCard
30-
project={props.project}
31-
searchParams={props.searchParams}
32-
teamSlug={props.teamSlug}
33-
wallets={props.wallets ?? []}
34-
/>
35-
</>
36-
)}
37-
<UnifiedTransactionsTable
38-
client={props.client}
39-
project={props.project}
40-
teamSlug={props.teamSlug}
41-
/>
27+
const engineTxSummaryQuery = useQuery({
28+
queryKey: [
29+
"engine-tx-analytics-summary",
30+
props.teamId,
31+
props.project.publishableKey,
32+
props.authToken,
33+
],
34+
queryFn: async () => {
35+
const data = await getTransactionAnalyticsSummary({
36+
clientId: props.project.publishableKey,
37+
teamId: props.teamId,
38+
authToken: props.authToken,
39+
});
40+
return data;
41+
},
42+
refetchOnWindowFocus: false,
43+
refetchOnMount: false,
44+
});
45+
46+
if (engineTxSummaryQuery.isPending) {
47+
return (
48+
<div className="flex h-[642px] grow items-center justify-center bg-card rounded-xl border">
49+
<Spinner className="size-10" />
4250
</div>
43-
</ResponsiveSearchParamsProvider>
51+
);
52+
}
53+
54+
const hasTransactions = engineTxSummaryQuery.data
55+
? engineTxSummaryQuery.data.totalCount > 0
56+
: false;
57+
58+
return (
59+
<div className="flex grow flex-col gap-10">
60+
<EngineChecklist
61+
isManagedVault={props.isManagedVault}
62+
client={props.client}
63+
hasTransactions={hasTransactions}
64+
project={props.project}
65+
teamSlug={props.teamSlug}
66+
testTxWithWallet={props.testTxWithWallet}
67+
testSolanaTxWithWallet={props.testSolanaTxWithWallet}
68+
wallets={props.wallets}
69+
solanaWallets={props.solanaWallets}
70+
/>
71+
72+
{props.showAnalytics && hasTransactions && (
73+
<div className="flex flex-col gap-6">
74+
<TransactionAnalyticsSummary
75+
clientId={props.project.publishableKey}
76+
teamId={props.project.teamId}
77+
initialData={engineTxSummaryQuery.data}
78+
/>
79+
<TransactionsAnalytics
80+
project={props.project}
81+
authToken={props.authToken}
82+
teamSlug={props.teamSlug}
83+
wallets={props.wallets ?? []}
84+
/>
85+
</div>
86+
)}
87+
88+
<UnifiedTransactionsTable
89+
client={props.client}
90+
project={props.project}
91+
teamSlug={props.teamSlug}
92+
/>
93+
</div>
4494
);
4595
}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/filter.tsx

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)