Skip to content

Commit

Permalink
feat(neuron-ui): display confirmations of pending transactions in the…
Browse files Browse the repository at this point in the history
… recent activity list
  • Loading branch information
Keith-CY committed Oct 23, 2019
1 parent 60af027 commit 9aebede
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/neuron-ui/src/components/CustomRows/ActivityRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ const ActivityRow = (props?: ActivityRowProps) => {
return (
<div
className={`${styles.activityRow} ${styles[status]}`}
title={`${hash}: ${description}`}
title={`${hash}: ${description || ''}`}
onDoubleClick={onDoubleClick}
>
<div className={styles.action}>{`${typeLabel} ${shannonToCKBFormatter(value)} CKB`}</div>
<div className={styles.status}>{statusLabel}</div>
<div className={styles.time}>{time}</div>
<div className={styles.meta}>{status === 'success' ? confirmations : ''}</div>
<div className={styles.meta}>{confirmations}</div>
</div>
)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/neuron-ui/src/components/Overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const Overview = ({
const activityItems: ActivityItem[] = useMemo(
() =>
items.map(item => {
let confirmations = '(-)'
let confirmations = ''
let typeLabel: string = item.type
let { status } = item
if (item.blockNumber !== undefined) {
Expand Down Expand Up @@ -147,7 +147,7 @@ const Overview = ({
status,
statusLabel: t(`overview.statusLabel.${status}`),
value: item.value.replace(/^-/, ''),
confirmations: item.status === 'success' ? confirmations : '',
confirmations: ['success', 'pending'].includes(item.status) ? confirmations : '',
typeLabel: t(`overview.${typeLabel}`),
}
}),
Expand Down

0 comments on commit 9aebede

Please sign in to comment.