Skip to content

Commit

Permalink
Fix/Timestamp-parsing (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Yehor Podporinov <[email protected]>
  • Loading branch information
yehor-podporinov and Yehor Podporinov authored Mar 11, 2024
1 parent fd4d6fb commit bea6be0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/pages/HomePage/views/PrivatePoolView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const barIndicators = computed<InfoBarType.Indicator[]>(() => [
{
title: t('home-page.private-pool-view.started-at-title'),
value: poolData.value
? new Time(poolData.value.payoutStart.toNumber() * 1000).format(
? new Time(poolData.value.payoutStart.toNumber()).format(
DEFAULT_TIME_FORMAT,
)
: '',
Expand All @@ -78,9 +78,9 @@ const barIndicators = computed<InfoBarType.Indicator[]>(() => [
title: t('home-page.private-pool-view.claim-at-title'),
value: poolData.value
? new Time(
(poolData.value.payoutStart.toNumber() +
poolData.value.claimLockPeriod.toNumber()) *
1000,
poolData.value.payoutStart
.add(poolData.value.claimLockPeriod)
.toNumber(),
).format(DEFAULT_TIME_FORMAT)
: '',
note: t('home-page.private-pool-view.claim-at-note'),
Expand Down
10 changes: 4 additions & 6 deletions src/pages/HomePage/views/PublicPoolView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const barIndicators = computed<InfoBarType.Indicator[]>(() => [
{
title: t('home-page.public-pool-view.started-at-title'),
value: poolData.value
? new Time(poolData.value.payoutStart.toNumber() * 1000).format(
? new Time(poolData.value.payoutStart.toNumber()).format(
DEFAULT_TIME_FORMAT,
)
: '',
Expand All @@ -167,11 +167,9 @@ const barIndicators = computed<InfoBarType.Indicator[]>(() => [
userPoolData.value && !userPoolData.value.lastStake.isZero()
? userPoolData.value.lastStake
.add(poolData.value.withdrawLockPeriodAfterStake)
.mul(1000)
.toNumber()
: poolData.value.payoutStart
.add(poolData.value.withdrawLockPeriod)
.mul(1000)
.toNumber(),
).format(DEFAULT_TIME_FORMAT)
: '',
Expand All @@ -181,9 +179,9 @@ const barIndicators = computed<InfoBarType.Indicator[]>(() => [
title: t('home-page.public-pool-view.claim-at-title'),
value: poolData.value
? new Time(
(poolData.value.payoutStart.toNumber() +
poolData.value.claimLockPeriod.toNumber()) *
1000,
poolData.value.payoutStart
.add(poolData.value.claimLockPeriod)
.toNumber(),
).format(DEFAULT_TIME_FORMAT)
: '',
note: t('home-page.public-pool-view.claim-at-note'),
Expand Down

0 comments on commit bea6be0

Please sign in to comment.