refinements and small bug fix
This commit is contained in:
@@ -7,7 +7,7 @@ export const NodeStats = ({ mixnodeId }: { mixnodeId?: string }) => {
|
||||
return (
|
||||
<Stack spacing={2} sx={{ p: 4 }}>
|
||||
<Typography>All your node stats are available on the link below</Typography>
|
||||
<Link href={`${urls.networkExplorer}/network-components/mixnodes/${mixnodeId}`} target="_blank">
|
||||
<Link href={`${urls.networkExplorer}/network-components/mixnode/${mixnodeId}`} target="_blank">
|
||||
<Button endIcon={<OpenInNew />}>Network Explorer</Button>
|
||||
</Link>
|
||||
</Stack>
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
import React, { useContext, useEffect, useState } from 'react'
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Chip,
|
||||
CircularProgress,
|
||||
Divider,
|
||||
Grid,
|
||||
LinearProgress,
|
||||
Stack,
|
||||
TextField,
|
||||
Typography,
|
||||
} from '@mui/material'
|
||||
import { AccessTimeOutlined, PercentOutlined } from '@mui/icons-material'
|
||||
import React, { useContext, useState } from 'react'
|
||||
import { Box, Button, CircularProgress, Grid, LinearProgress, Stack, TextField, Typography } from '@mui/material'
|
||||
import { PercentOutlined } from '@mui/icons-material'
|
||||
import { yupResolver } from '@hookform/resolvers/yup'
|
||||
import { useForm } from 'react-hook-form'
|
||||
import { InfoTooltip } from '../../components/InfoToolTip'
|
||||
@@ -39,7 +28,6 @@ export const SystemVariables = ({
|
||||
onUpdate: () => void
|
||||
}) => {
|
||||
const [nodeUpdateResponse, setNodeUpdateResponse] = useState<'success' | 'failed'>()
|
||||
const [configFee, setConfigFee] = useState<string>()
|
||||
|
||||
const {
|
||||
register,
|
||||
@@ -91,12 +79,12 @@ export const SystemVariables = ({
|
||||
/>
|
||||
|
||||
<DataField
|
||||
title="Chance of being in the active set"
|
||||
title="Estimated chance of being in the active set"
|
||||
info="Probability of getting selected in the reward set (active and standby nodes) in the next epoch. The more your stake, the higher the chances to be selected"
|
||||
Indicator={<PercentIndicator value={inclusionProbability.in_active} />}
|
||||
/>
|
||||
<DataField
|
||||
title="Chance of being in the standby set"
|
||||
title="Estimated chance of being in the standby set"
|
||||
info="Probability of getting selected in the reward set (active and standby nodes) in the next epoch. The more your stake, the higher the chances to be selected"
|
||||
Indicator={<PercentIndicator value={inclusionProbability.in_reserve} />}
|
||||
/>
|
||||
|
||||
@@ -50,9 +50,10 @@ export const useSettingsState = (shouldUpdate: boolean) => {
|
||||
const getMixnodeInclusionProbability = async () => {
|
||||
if (mixnodeDetails?.mix_node.identity_key) {
|
||||
const probability = await getInclusionProbability(mixnodeDetails?.mix_node.identity_key)
|
||||
|
||||
if (probability) {
|
||||
setInclusionProbability(probability)
|
||||
const in_active = Math.round(probability.in_active * 100)
|
||||
const in_reserve = Math.round(probability.in_reserve * 100)
|
||||
setInclusionProbability({ in_active, in_reserve })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user