Skip to content

Commit

Permalink
fix(neuron-ui): hide the confirmations of pending txs
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Oct 29, 2019
1 parent dfd9c5d commit 456210d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/neuron-ui/src/components/Overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ const Overview = ({
let { status } = item
if (item.blockNumber !== undefined) {
const confirmationCount =
item.blockNumber === undefined ? 0 : 1 + Math.max(+syncedBlockNumber, +tipBlockNumber) - +item.blockNumber
item.blockNumber === null || item.status === 'failed'
? 0
: 1 + Math.max(+syncedBlockNumber, +tipBlockNumber) - +item.blockNumber

if (status === 'success' && confirmationCount < CONFIRMATION_THRESHOLD) {
status = 'pending'
Expand All @@ -147,7 +149,7 @@ const Overview = ({
status,
statusLabel: t(`overview.statusLabel.${status}`),
value: item.value.replace(/^-/, ''),
confirmations: ['success', 'pending'].includes(item.status) ? confirmations : '',
confirmations,
typeLabel: t(`overview.${typeLabel}`),
}
}),
Expand Down

0 comments on commit 456210d

Please sign in to comment.