Skip to content

Commit

Permalink
Mock voting power
Browse files Browse the repository at this point in the history
  • Loading branch information
carina-akaia committed Nov 29, 2024
1 parent ba1c9d3 commit 591c1c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/pot/hooks/clearance.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffect, useMemo, useState } from "react";

import { Big } from "big.js";
import { prop } from "remeda";

import { METAPOOL_LIQUID_STAKING_CONTRACT_ACCOUNT_ID } from "@/common/_config";
Expand Down Expand Up @@ -114,6 +115,7 @@ export const usePotUserApplicationClearance = ({
});

// TODO: Get voting power from the snapshot
const votingPower = Big(0);

// TODO: calculate this
const metaPoolDaoRpgfScore = 0;
Expand All @@ -129,7 +131,7 @@ export const usePotUserApplicationClearance = ({
isSatisfied: stNear?.balanceUsd?.gte(25) ?? false,
},

{ title: "Voting power 5000 or more", isSatisfied: false },
{ title: "Voting power 5000 or more", isSatisfied: votingPower.gte(5000) },

{
title: "A total of 10 points accumulated for the RPGF score",
Expand All @@ -144,7 +146,7 @@ export const usePotUserApplicationClearance = ({
isEveryRequirementSatisfied: requirements.every(prop("isSatisfied")),
error: null,
};
}, [isVerifiedPublicGoodsProvider, isVotingBasedPot, stNear?.balanceUsd]);
}, [isVerifiedPublicGoodsProvider, isVotingBasedPot, stNear?.balanceUsd, votingPower]);
};

// TODO: refactor to support multi-mechanism for the V2 milestone
Expand Down

0 comments on commit 591c1c3

Please sign in to comment.