Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
bryzettler committed Dec 9, 2024
1 parent a0352e2 commit 30ae71f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/features/governance/PositionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ export const PositionCard = ({
const hasActiveVotes = position.numActiveVotes > 0
const decayedEpoch = lockup.endTs.div(new BN(EPOCH_LENGTH))
const currentEpoch = new BN(unixNow).div(new BN(EPOCH_LENGTH))
const lockupExpired =
const isDecayed =
!isConstant &&
(isDelegated
? currentEpoch.gt(decayedEpoch)
: lockup.endTs.sub(new BN(unixNow || 0)).lt(new BN(0)))
: lockup.endTs.lte(new BN(unixNow)))

const lockedTokens =
mintAcc && humanReadable(position.amountDepositedNative, mintAcc.decimals)
Expand Down Expand Up @@ -606,7 +606,7 @@ export const PositionCard = ({
</>
) : (
<>
{lockupExpired ? (
{isDecayed ? (
<ListItem
key="close"
title={t('gov.positions.close')}
Expand Down

0 comments on commit 30ae71f

Please sign in to comment.