Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…frontend into develop
  • Loading branch information
Keith-CY committed Jul 11, 2024
2 parents 9cda87e + bf084c9 commit efd7b32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/Transaction/TransactionComp/NodeTransactionComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export const NodeTransactionComp = ({
const isCellBase = checkIsCellBase(transaction)
const { nodeService } = useCKBNode()
const { data: cellBaseBlockHeader } = useQuery(
['node', 'block', blockNumber ? parseInt(blockNumber, 16) - 11 : null],
() => (blockNumber ? nodeService.rpc.getBlockByNumber((parseInt(blockNumber, 16) - 11).toString(16)) : null),
['node', 'header', blockNumber ? parseInt(blockNumber, 16) - 11 : null],
() => nodeService.rpc.getHeaderByNumber(`0x${(parseInt(blockNumber!, 16) - 11).toString(16)}`),
{
enabled: isCellBase,
enabled: isCellBase && Boolean(blockNumber),
},
)

Expand All @@ -33,7 +33,7 @@ export const NodeTransactionComp = ({
<>
<div className="transactionInputs">
{isCellBase ? (
<NodeTransactionCellBase blockHash={cellBaseBlockHeader?.header.hash} blockNumber={blockNumber} />
<NodeTransactionCellBase blockHash={cellBaseBlockHeader?.hash} blockNumber={blockNumber} />
) : (
<>
<Loading show={isInputsLoading} />
Expand Down

0 comments on commit efd7b32

Please sign in to comment.