Skip to content

Commit 278e889

Browse files
committed
conditionally display caller, fix tooltip for txn hash
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
1 parent b2c347a commit 278e889

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

packages/web/app/sql-log/page.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default async function TxnPage({
6060
<div className="flex flex-col">
6161
<HashDisplay
6262
hash={log.txHash}
63-
name="txn hash"
63+
hashDesc="txn hash"
6464
numCharacters={8}
6565
copy
6666
className={cn(
@@ -81,18 +81,20 @@ export default async function TxnPage({
8181
)}
8282
</div>
8383
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3">
84-
<MetricCard>
85-
<MetricCardHeader>
86-
<MetricCardTitle>Sent by</MetricCardTitle>
87-
</MetricCardHeader>
88-
<MetricCardContent>
89-
<HashDisplay
90-
hash={log.caller}
91-
copy
92-
className="text-3xl text-foreground"
93-
/>
94-
</MetricCardContent>
95-
</MetricCard>
84+
{log.caller && (
85+
<MetricCard>
86+
<MetricCardHeader>
87+
<MetricCardTitle>Sent by</MetricCardTitle>
88+
</MetricCardHeader>
89+
<MetricCardContent>
90+
<HashDisplay
91+
hash={log.caller}
92+
copy
93+
className="text-3xl text-foreground"
94+
/>
95+
</MetricCardContent>
96+
</MetricCard>
97+
)}
9698
<MetricCard>
9799
<MetricCardHeader>
98100
<MetricCardTitle>Timestamp</MetricCardTitle>

packages/web/lib/validator-queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export async function getPopularTables(
6868
export interface SqlLog {
6969
blockNumber: number;
7070
txIndex: number;
71-
caller: string;
71+
caller: string | null;
7272
error: string | null;
7373
eventIndex: number;
7474
eventType: "ContractRunSQL" | "ContractCreateTable";

0 commit comments

Comments
 (0)