Skip to content

Commit

Permalink
feat: 🎸 Updated threshold for proposal #74
Browse files Browse the repository at this point in the history
  • Loading branch information
fpbrault committed Jan 24, 2023
1 parent cbf740e commit 4256df1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion components/PoolModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function PoolModal(props: {
style={tableStyle}
onClick={() => setShow(true)}
>
{parseFloat(value) < 1 ? ">1%" : parseFloat(value).toFixed(1) + "%"}
{parseFloat(value) < .5 ? ">.5%" : parseFloat(value).toFixed(2) + "%"}
</button>
<div className="modal">
<div className="modal-box">
Expand Down
16 changes: 8 additions & 8 deletions pages/api/rewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
console.error(error);
});

const rewardThreshold = stats.votes_value_sum * 0.01;
const rewardThreshold = stats.votes_value_sum * 0.005;

const votes = await fetch(
"https://voting-tracker.aqua.network/api/voting-snapshot/top-volume/?limit=50&page=1",
Expand Down Expand Up @@ -50,7 +50,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)

const futureRewards = await fetch(
"https://marketkeys-tracker.aqua.network/api/market-keys/?account_id=" +
rewardAssetsList.join("&account_id="),
rewardAssetsList.join("&account_id="),
{
method: "GET",
headers: { "Content-Type": "application/json" }
Expand Down Expand Up @@ -142,13 +142,13 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
asset2_issuer: string;
}) =>
futureReward.asset1_code +
futureReward.asset1_issuer +
futureReward.asset2_code +
futureReward.asset2_issuer ==
futureReward.asset1_issuer +
futureReward.asset2_code +
futureReward.asset2_issuer ==
asset.market_key.asset1_code +
asset.market_key.asset1_issuer +
asset.market_key.asset2_code +
asset.market_key.asset2_issuer
asset.market_key.asset1_issuer +
asset.market_key.asset2_code +
asset.market_key.asset2_issuer
);
const reward = rewardAssets.find(
(key: { market_key: string }) => key.market_key === res?.account_id
Expand Down

0 comments on commit 4256df1

Please sign in to comment.