Skip to content

Commit de2a454

Browse files
polish
1 parent 00576f4 commit de2a454

File tree

2 files changed

+6
-23
lines changed

2 files changed

+6
-23
lines changed

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

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { engineCloudProxy } from "@/actions/proxies";
33
import type { Project } from "@/api/projects";
44
import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors";
5-
import { WalletAvatar } from "@/components/blocks/wallet-address";
65
import { Button } from "@/components/ui/button";
76
import { Input } from "@/components/ui/input";
87
import {
@@ -26,9 +25,9 @@ import {
2625
optimismSepolia,
2726
sepolia,
2827
} from "thirdweb/chains";
29-
import { shortenAddress } from "thirdweb/utils";
3028
import * as z from "zod";
3129
import type { Wallet } from "../server-wallets/wallet-table/types";
30+
import { SmartAccountCell } from "../server-wallets/wallet-table/wallet-table-ui.client";
3231

3332
const formSchema = z.object({
3433
accessToken: z.string().min(1, "Access token is required"),
@@ -171,15 +170,7 @@ export function SendTestTransaction(props: {
171170
<SelectTrigger className="w-full">
172171
<SelectValue>
173172
<div className="flex items-center gap-2">
174-
<WalletAvatar
175-
address={selectedWallet.address}
176-
profiles={[]}
177-
thirdwebClient={thirdwebClient}
178-
iconClassName="h-5 w-5"
179-
/>
180-
<span className="font-mono text-sm">
181-
{shortenAddress(selectedWallet.address)}
182-
</span>
173+
<SmartAccountCell wallet={selectedWallet} />
183174
<span className="text-muted-foreground text-sm">
184175
{selectedWallet.metadata.label}
185176
</span>
@@ -190,15 +181,7 @@ export function SendTestTransaction(props: {
190181
{props.wallets.map((wallet, index) => (
191182
<SelectItem key={wallet.address} value={index.toString()}>
192183
<div className="flex items-center gap-2">
193-
<WalletAvatar
194-
address={wallet.address}
195-
profiles={[]}
196-
thirdwebClient={thirdwebClient}
197-
iconClassName="h-5 w-5"
198-
/>
199-
<span className="font-mono text-sm">
200-
{shortenAddress(wallet.address)}
201-
</span>
184+
<SmartAccountCell wallet={wallet} />
202185
<span className="text-muted-foreground text-sm">
203186
{selectedWallet.metadata.label}
204187
</span>

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/server-wallets/wallet-table/wallet-table-ui.client.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import type { Project } from "@/api/projects";
44
import { WalletAddress } from "@/components/blocks/wallet-address";
5-
import { Spinner } from "@/components/ui/Spinner/Spinner";
65
import {
76
Table,
87
TableBody,
@@ -23,6 +22,7 @@ import {
2322
predictSmartAccountAddress,
2423
} from "thirdweb/wallets/smart";
2524
import { Badge } from "../../../../../../../../@/components/ui/badge";
25+
import { Skeleton } from "../../../../../../../../@/components/ui/skeleton";
2626
import { Switch } from "../../../../../../../../@/components/ui/switch";
2727
import { useV5DashboardChain } from "../../../../../../../../lib/v5-adapter";
2828
import CreateServerWallet from "../components/create-server-wallet.client";
@@ -111,7 +111,7 @@ export function ServerWalletsTableUI({
111111
);
112112
}
113113

114-
function SmartAccountCell({ wallet }: { wallet: Wallet }) {
114+
export function SmartAccountCell({ wallet }: { wallet: Wallet }) {
115115
const chainId = 1; // TODO: add chain switcher for balance + smart account address
116116
const chain = useV5DashboardChain(chainId);
117117

@@ -136,7 +136,7 @@ function SmartAccountCell({ wallet }: { wallet: Wallet }) {
136136
<Badge variant={"default"}>Smart Account</Badge>
137137
</div>
138138
) : (
139-
<Spinner className="h-4 w-4" />
139+
<Skeleton className="h-4 w-20" />
140140
)}
141141
</div>
142142
);

0 commit comments

Comments
 (0)