Skip to content

Commit 2057546

Browse files
authored
Nebula: Recent Activity improvements in sidebar (#7055)
1 parent ba52e68 commit 2057546

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

apps/dashboard/src/app/nebula-app/(app)/components/TransactionsSection/TransactionsSection.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function TransactionInfo(props: {
8888
<div className="relative flex h-[48px] items-center gap-2.5 rounded-lg px-2 py-1 hover:bg-accent">
8989
<ChainIconClient
9090
client={props.client}
91-
className="size-8"
91+
className="size-8 rounded-full border"
9292
src={chainMeta?.icon?.url || ""}
9393
/>
9494

@@ -167,20 +167,29 @@ export function TransactionsSection(props: {
167167
const url = new URL(
168168
`https://insight.${isProd ? "thirdweb" : "thirdweb-dev"}.com/v1/wallets/${account.address}/transactions`,
169169
);
170-
url.searchParams.set("limit", "10");
170+
url.searchParams.set("limit", "20");
171171
url.searchParams.set("decode", "true");
172172
url.searchParams.set("clientId", nebulaAppThirdwebClient.clientId);
173173

174+
const threeMonthsAgoUnixTime = Math.floor(
175+
(Date.now() - 3 * 30 * 24 * 60 * 60 * 1000) / 1000,
176+
);
177+
178+
url.searchParams.set(
179+
"filter_block_timestamp_gte",
180+
`${threeMonthsAgoUnixTime}`,
181+
);
182+
174183
for (const chain of chains) {
175184
url.searchParams.append("chain", chain.toString());
176185
}
177186

178187
const response = await fetch(url.toString());
179188
const json = (await response.json()) as {
180-
data: WalletTransaction[];
189+
data?: WalletTransaction[];
181190
};
182191

183-
return json.data;
192+
return json.data ?? [];
184193
},
185194
retry: false,
186195
enabled: !!account && !!activeChain,

0 commit comments

Comments
 (0)