Skip to content

Commit 86162f0

Browse files
committed
chore: remove payback metric
1 parent 1f9b155 commit 86162f0

File tree

1 file changed

+1
-37
lines changed
  • web/src/pages/Courts/CourtDetails/StakePanel/SimulatorPopup

1 file changed

+1
-37
lines changed

web/src/pages/Courts/CourtDetails/StakePanel/SimulatorPopup/index.tsx

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import GavelIcon from "svgs/icons/gavel.svg";
2121
import LawBalanceIcon from "svgs/icons/law-balance.svg";
2222
import DiceIcon from "svgs/icons/dice.svg";
2323
import DollarIcon from "svgs/icons/dollar.svg";
24-
import ClockIcon from "svgs/icons/clock.svg";
2524
import ArrowRightIcon from "svgs/icons/arrow-right.svg";
2625

2726
import Header from "./Header";
@@ -45,7 +44,7 @@ const ItemsContainer = styled.div`
4544
display: flex;
4645
flex-direction: column;
4746
gap: 8px 0;
48-
margin: 24px 0;
47+
margin: 24px 0 12px 0;
4948
`;
5049

5150
const SimulatorItem = styled.div`
@@ -146,7 +145,6 @@ const SimulatorPopup: React.FC<ISimulatorPopup> = ({ amountToStake, isStaking })
146145
const timeframedCourtData = useHomePageExtraStats(30);
147146
const { prices: pricesData } = useCoinPrice([CoinIds.ETH, CoinIds.PNK]);
148147
const ethPriceUSD = pricesData ? pricesData[CoinIds.ETH]?.price : undefined;
149-
const pnkPriceUSD = pricesData ? pricesData[CoinIds.PNK]?.price : undefined;
150148

151149
const foundCourt = useMemo(() => {
152150
return timeframedCourtData?.data?.courts?.find((c) => c.id === id);
@@ -204,32 +202,6 @@ const SimulatorPopup: React.FC<ISimulatorPopup> = ({ amountToStake, isStaking })
204202
)
205203
);
206204

207-
// const monthlyRewardUSD =
208-
// foundCourt && ethPriceUSD && currentEffectiveStake
209-
// ? currentEffectiveStake * foundCourt.treeExpectedRewardPerPnk * ethPriceUSD
210-
// : undefined;
211-
212-
// const currentPayback =
213-
// foundCourt && pnkPriceUSD && monthlyRewardUSD
214-
// ? Math.max((currentEffectiveStake * pnkPriceUSD) / monthlyRewardUSD, 0)
215-
// : undefined;
216-
217-
// const futureMonthlyRewardUSD =
218-
// foundCourt && ethPriceUSD && currentEffectiveStake
219-
// ? isStaking
220-
// ? (currentEffectiveStake + amountToStake) * foundCourt.treeExpectedRewardPerPnk * ethPriceUSD
221-
// : (currentEffectiveStake - amountToStake) * foundCourt.treeExpectedRewardPerPnk * ethPriceUSD
222-
// : undefined;
223-
224-
// const futurePayback =
225-
// foundCourt && pnkPriceUSD && futureMonthlyRewardUSD
226-
// ? Math.max(
227-
// ((isStaking ? currentEffectiveStake + amountToStake : currentEffectiveStake - amountToStake) * pnkPriceUSD) /
228-
// futureMonthlyRewardUSD,
229-
// 0
230-
// )
231-
// : undefined;
232-
233205
const simulatorItems = [
234206
{
235207
title: "Votes",
@@ -257,14 +229,6 @@ const SimulatorPopup: React.FC<ISimulatorPopup> = ({ amountToStake, isStaking })
257229
tooltipMsg:
258230
"Estimated rewards in USD, assuming 100% coherent voting. If other jurors vote incoherently, additional rewards in the form of PNK tokens may be earned beyond this estimate.",
259231
},
260-
{
261-
title: "Payback",
262-
icon: <ClockIcon />,
263-
currentValue: `32 months`,
264-
futureValue: `24 months`,
265-
tooltipMsg:
266-
"Estimated time to recover your PNK investment, assuming 100% coherent voting. If other jurors vote incoherently, the payback period may be shorter due to additional rewards in the form of PNK tokens.",
267-
},
268232
];
269233

270234
return (

0 commit comments

Comments
 (0)