[DOCs/operators]: Hotfix - Round decimalds to common convention (#5791)

This commit is contained in:
import this
2025-05-21 16:02:09 +00:00
committed by GitHub
parent ede5ffaffc
commit 39195d79f5
2 changed files with 8 additions and 5 deletions
@@ -5,20 +5,23 @@ import RewardParams from 'components/outputs/api-scraping-outputs/reward-params.
export default function RewardsCalculator() {
const [a, setA] = useState(
Math.round(Number(RewardParams.interval.epoch_reward_budget) / 1_000_000)
Number(
(Number(RewardParams.interval.epoch_reward_budget) / 1_000_000).toFixed(6)
)
)
const [b, setB] = useState(0)
const [c, setC] = useState(0)
const [d, setD] = useState(0)
const [e, setE] = useState(
Math.round(Number(RewardParams.interval.stake_saturation_point) / 1_000_000)
Number(
(Number(RewardParams.interval.stake_saturation_point) / 1_000_000).toFixed(6)
)
)
const result =
e !== 0
? `${(
a * b * c * ((1 / 240) + 0.3 * ((d / e) / 240)) * 1 / (1 + 0.3)
).toFixed(4)} NYM`
).toFixed(6)} NYM`
: '—'
return (
@@ -1 +1 @@
Wednesday, May 21st 2025, 09:16:14 UTC
Wednesday, May 21st 2025, 13:50:05 UTC