Skip to content

Commit 362605b

Browse files
committed
fix: check txId before prefetch
1 parent e420dd9 commit 362605b

File tree

2 files changed

+5
-3
lines changed
  • packages/app-explorer/src/systems

2 files changed

+5
-3
lines changed

packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { ReceiptType } from '@fuel-explorer/graphql';
1+
import { ReceiptType } from '@fuel-explorer/graphql/src/sdk';
22
import type {
33
Maybe,
44
OperationReceipt,
55
TransactionReceiptFragment,
6-
} from '@fuel-explorer/graphql';
6+
} from '@fuel-explorer/graphql/src/sdk';
77
import type { BaseProps } from '@fuels/ui';
88
import {
99
Address,

packages/app-explorer/src/systems/Transactions/components/TxCard/TxCard.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { IconGasStation } from '@tabler/icons-react';
1414
import Link from 'next/link';
1515
import { Routes } from '~/routes';
1616

17+
import { isValidAddress } from '~/systems/Core/utils/address';
1718
import { TX_INTENT_MAP } from '../../../Transaction/component/TxIcon/TxIcon';
1819
import type { TransactionNode } from '../../../Transaction/types';
1920

@@ -29,9 +30,10 @@ export function TxCard({
2930
...props
3031
}: TxCardProps) {
3132
const fee = bn(tx.fee);
33+
const isValidTxID = isValidAddress(tx.id);
3234

3335
return (
34-
<Link scroll={true} href={Routes.txSimple(tx.id)}>
36+
<Link scroll={true} href={Routes.txSimple(tx.id)} prefetch={isValidTxID}>
3537
<Card {...props} className={cx(className)}>
3638
<Card.Body className="flex flex-col gap-4 laptop:flex-row laptop:justify-between">
3739
<Box className="flex gap-3 h-[26px]">

0 commit comments

Comments
 (0)