Skip to content

Commit

Permalink
fix: display veMento when user has no locks
Browse files Browse the repository at this point in the history
  • Loading branch information
denviljclarke committed Oct 28, 2024
1 parent ee6e514 commit 8fffa0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/locks-list/locks-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export const LocksList = () => {
const { lock, unlockedMento, hasLock } = useLockInfo(address);
const { veMentoBalance } = useTokens();

const noVotingPower = veMentoBalance.value < BigInt(0);

if (!address) {
return (
<Card block>
Expand All @@ -26,7 +28,7 @@ export const LocksList = () => {
);
}

if (!hasLock) {
if (!hasLock && noVotingPower) {
return (
<Card block>
<div className="text-center">You have no existing locks</div>
Expand All @@ -38,7 +40,9 @@ export const LocksList = () => {
return <>loading...</>;
}

const parsedExpirationDate = format(lock.expiration, "dd/MM/yyyy");
const parsedExpirationDate = hasLock
? format(lock?.expiration, "dd/MM/yyyy")
: "-";

return (
<LockInfo
Expand Down

0 comments on commit 8fffa0b

Please sign in to comment.