diff --git a/packages/neuron-ui/src/components/Overview/index.tsx b/packages/neuron-ui/src/components/Overview/index.tsx index e4b1ca53fe..04c2269a66 100644 --- a/packages/neuron-ui/src/components/Overview/index.tsx +++ b/packages/neuron-ui/src/components/Overview/index.tsx @@ -285,9 +285,16 @@ const Overview = ({ items.map(item => { let confirmations = '(-)' let typeLabel: string = item.type + let { status } = item if (item.blockNumber !== undefined) { const confirmationCount = 1 + Math.max(+syncedBlockNumber, +tipBlockNumber) - +item.blockNumber + + if (status === 'success' && confirmationCount < CONFIRMATION_THRESHOLD) { + status = 'pending' + } + typeLabel = genTypeLabel(item.type, confirmationCount) + if (confirmationCount === 1) { confirmations = `(${t('overview.confirmation', { confirmationCount: localNumberFormatter(confirmationCount), @@ -298,8 +305,10 @@ const Overview = ({ })})` } } + return { ...item, + status, confirmations: item.status === 'success' ? confirmations : '', typeLabel: t(`overview.${typeLabel}`), } diff --git a/packages/neuron-ui/src/utils/const.ts b/packages/neuron-ui/src/utils/const.ts index b6f53e4ac3..2e90e2ab09 100644 --- a/packages/neuron-ui/src/utils/const.ts +++ b/packages/neuron-ui/src/utils/const.ts @@ -6,7 +6,7 @@ export const MIN_AMOUNT = 61 export const PAGE_SIZE = 15 export const UNREMOVABLE_NETWORK = 'Testnet' export const UNREMOVABLE_NETWORK_ID = '0' -export const CONFIRMATION_THRESHOLD = 6 +export const CONFIRMATION_THRESHOLD = 10 export enum ConnectionStatus { Online = 'online',