Skip to content

Commit

Permalink
fix(app): handle gasUsed initially undefined for some reason
Browse files Browse the repository at this point in the history
  • Loading branch information
hbriese committed Aug 23, 2024
1 parent cc9e4c5 commit b47f4af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/components/transaction/TransactionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export interface TransactionDetailsProps {
export function TransactionDetails(props: TransactionDetailsProps) {
const t = useFragment(Transaction, props.transaction);

console.log(t);

return (
<>
<ItemListSubheader>Details</ItemListSubheader>
Expand All @@ -48,7 +50,7 @@ export function TransactionDetails(props: TransactionDetailsProps) {
}
trailing={
<Percent
value={Number((BigInt(t.result.gasUsed) * 10000n) / BigInt(t.gasLimit)) / 100}
value={Number((BigInt(t.result.gasUsed ?? 0) * 10000n) / BigInt(t.gasLimit)) / 100}
/>
}
/>
Expand Down

0 comments on commit b47f4af

Please sign in to comment.