Skip to content

Commit 9aebede

Browse files
committed
feat(neuron-ui): display confirmations of pending transactions in the recent activity list
1 parent 60af027 commit 9aebede

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/neuron-ui/src/components/CustomRows/ActivityRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ const ActivityRow = (props?: ActivityRowProps) => {
3434
return (
3535
<div
3636
className={`${styles.activityRow} ${styles[status]}`}
37-
title={`${hash}: ${description}`}
37+
title={`${hash}: ${description || ''}`}
3838
onDoubleClick={onDoubleClick}
3939
>
4040
<div className={styles.action}>{`${typeLabel} ${shannonToCKBFormatter(value)} CKB`}</div>
4141
<div className={styles.status}>{statusLabel}</div>
4242
<div className={styles.time}>{time}</div>
43-
<div className={styles.meta}>{status === 'success' ? confirmations : ''}</div>
43+
<div className={styles.meta}>{confirmations}</div>
4444
</div>
4545
)
4646
}

packages/neuron-ui/src/components/Overview/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const Overview = ({
118118
const activityItems: ActivityItem[] = useMemo(
119119
() =>
120120
items.map(item => {
121-
let confirmations = '(-)'
121+
let confirmations = ''
122122
let typeLabel: string = item.type
123123
let { status } = item
124124
if (item.blockNumber !== undefined) {
@@ -147,7 +147,7 @@ const Overview = ({
147147
status,
148148
statusLabel: t(`overview.statusLabel.${status}`),
149149
value: item.value.replace(/^-/, ''),
150-
confirmations: item.status === 'success' ? confirmations : '',
150+
confirmations: ['success', 'pending'].includes(item.status) ? confirmations : '',
151151
typeLabel: t(`overview.${typeLabel}`),
152152
}
153153
}),

0 commit comments

Comments
 (0)