Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the remaining time display in Nervos DAO is abnormal #3239

Merged
merged 4 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/neuron-ui/src/components/NervosDAORecord/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ export const DAORecord = ({
break
}
case CellStatus.Deposited: {
if (leftHours) {
if (!compensationEndEpochValue) {
message = t('nervos-dao.compensation-period.stage-messages.calculating-the-compensation-cycle')
} else if (leftHours) {
message = t('nervos-dao.compensation-period.stage-messages.next-compensation-cycle-hours', {
hours: leftHours || '--',
})
Expand All @@ -149,7 +151,9 @@ export const DAORecord = ({
break
}
case CellStatus.Locked: {
if (leftHours) {
if (!compensationEndEpochValue) {
message = t('nervos-dao.compensation-period.stage-messages.calculating-the-compensation-cycle')
} else if (leftHours) {
message = t('nervos-dao.compensation-period.stage-messages.compensation-cycle-will-end-hours', {
hours: leftHours || '--',
})
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,8 @@
"compensation-cycle-will-end": "Compensation cycle ends in approximately {{days}} days",
"compensation-cycle-will-end-hours": "Compensation cycle ends in approximately {{hours}} hours",
"compensation-cycle-has-ended": "Cycle has ended, CKB is ready to be unlocked",
"unlocking": "Unlocking..."
"unlocking": "Unlocking...",
"calculating-the-compensation-cycle": "Calculating the compensation cycle"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@
"compensation-cycle-will-end": "El ciclo de compensación termina en aproximadamente {{days}} días",
"compensation-cycle-will-end-hours": "El ciclo de compensación termina en aproximadamente {{hours}} horas",
"compensation-cycle-has-ended": "El ciclo ha terminado, CKB está listo para ser desbloqueado",
"unlocking": "Desbloqueando..."
"unlocking": "Desbloqueando...",
"calculating-the-compensation-cycle": "Calculando el ciclo de compensación"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,8 @@
"compensation-cycle-will-end": "La période de compensation se termine dans environ {{days}} jours",
"compensation-cycle-will-end-hours": "La période de compensation se termine dans environ {{hours}} heures",
"compensation-cycle-has-ended": "Le cycle est terminé, les CKB sont prêts à être déverrouillés",
"unlocking": "Déverrouillage en cours..."
"unlocking": "Déverrouillage en cours...",
"calculating-the-compensation-cycle": "Calculer le cycle de compensation"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@
"compensation-cycle-will-end": "補償週期約在 {{days}} 天后結束",
"compensation-cycle-will-end-hours": "補償週期約在 {{hours}} 小時后結束",
"compensation-cycle-has-ended": "補償週期已結束, 可以解鎖 CKB",
"unlocking": "解鎖中..."
"unlocking": "解鎖中...",
"calculating-the-compensation-cycle": "正在計算補償週期"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,8 @@
"compensation-cycle-will-end": "补偿周期约在 {{days}} 天后结束",
"compensation-cycle-will-end-hours": "补偿周期约在 {{hours}} 小时后结束",
"compensation-cycle-has-ended": "补偿周期已结束, 可以解锁 CKB",
"unlocking": "解锁中..."
"unlocking": "解锁中...",
"calculating-the-compensation-cycle": "正在计算补偿周期"
}
}
},
Expand Down