Skip to content

Commit

Permalink
Merge branch 'pending-tx-list-of-address' of https://github.com/magic…
Browse files Browse the repository at this point in the history
…kbase/ckb-explorer-frontend into pending-tx-list-of-address
  • Loading branch information
Keith-CY committed Dec 14, 2023
2 parents d56acfb + abcdef8 commit dd4c667
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/TransactionItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const TransactionItem = ({
>
{transaction.transactionHash}
</AddressText>
{/* transactio.blockNumber is empty string when the transaction is pending or rejected */}
{/* FIXME: transactio.blockNumber is empty string when the transaction is pending or rejected, this should be updated once the type declaration is fixed to number */}
{!isBlock && transaction.blockNumber !== '' && (
<div className="transactionItemBlock">
{`(${t('block.block')} ${localeNumberString(transaction.blockNumber)}) ${parsedBlockCreateAt}`}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Address/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ export const Address = () => {
const transactionCounts: Record<'committed' | 'pending', number | '-'> = {
committed:
addressInfoQuery.isFetched && addressInfoQuery.data
? // FIXME: this type convertion could be removed once the type declaration of Transaction is fixed
? // FIXME: this type conversion could be removed once the type declaration of Transaction is fixed
Number(addressInfoQuery.data.transactionsCount) ?? '-'
: '-',
pending: pendingTransactionCountQuery.isFetched ? pendingTransactionCountQuery.data ?? '-' : '-',
pending: pendingTransactionCountQuery.data ?? '-',
}

const newAddr = useNewAddr(address)
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Transaction/TransactionComp/TransactionOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,14 @@ export const TransactionOverviewCard: FC<{
const isProfessional = layout === LayoutLiteProfessional.Professional

if (tipBlockNumber && blockNumber) {
// FIXME: the type conversion should be removed once the type declaration is fixed to number
confirmation = Number(tipBlockNumber) - Number(blockNumber)
}

const blockHeightData: CardCellInfo = {
title: t('block.block_height'),
tooltip: t('glossary.block_height'),
// FIXME: the type conversion should be removed once the type declaration is fixed to number
content: <TransactionBlockHeight blockNumber={Number(blockNumber)} txStatus={txStatus} />,
className: styles.firstCardCell,
}
Expand Down

0 comments on commit dd4c667

Please sign in to comment.