Merge pull request #559 from ToTheMars2/patch-2

Correct upgrade time for proposals
This commit is contained in:
ping 2024-04-11 03:58:17 +08:00 committed by GitHub
commit 8ab5d41de0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,7 +128,7 @@ const upgradeCountdown = computed((): number => {
if (height > 0) {
const base = useBaseStore();
const current = Number(base.latest?.block?.header?.height || 0);
return (height - current) * 6 * 1000;
return (height - current) * Number((base.blocktime / 1000).toFixed()) * 1000;
}
const now = new Date();
const end = new Date(proposal.value.content?.plan?.time || '');