Skip to content

Commit

Permalink
fix: If node is connecting, show '--' for confirmation (nervosnetwork…
Browse files Browse the repository at this point in the history
  • Loading branch information
yanguoyu authored Mar 14, 2024
1 parent 57b018e commit 0fd9de0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/neuron-ui/src/components/History/RowExtend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ const RowExtend = ({ column, columns, isMainnet, id, bestBlockNumber }: RowExten
)

const { blockNumber, hash, description, status } = column
const confirmations = blockNumber ? 1 + bestBlockNumber - +blockNumber : 0
const confirmationsLabel = confirmations > 1000 ? '1,000+' : localNumberFormatter(confirmations)
const confirmations = bestBlockNumber && blockNumber ? 1 + bestBlockNumber - +blockNumber : null
const confirmationsLabel =
// eslint-disable-next-line no-nested-ternary
confirmations === null ? '--' : confirmations > 1000 ? '1,000+' : localNumberFormatter(confirmations)
const onCopy = useCallback(() => {
window.navigator.clipboard.writeText(hash)
showPageNotice('common.copied')(dispatch)
Expand Down

1 comment on commit 0fd9de0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 8276760889

Please sign in to comment.