-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #823 from alleslabs/feat/validator-recent-100-block
validator uptime & penalty events
- Loading branch information
Showing
14 changed files
with
235 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/lib/pages/validator-details/components/performance/PenaltyEvent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Flex, Text } from "@chakra-ui/react"; | ||
|
||
import { ExplorerLink } from "lib/components/ExplorerLink"; | ||
import { CustomIcon } from "lib/components/icon"; | ||
import type { ValidatorUptimeResponse } from "lib/services/validator"; | ||
|
||
interface PenaltyEventProps { | ||
event: ValidatorUptimeResponse["events"][0]; | ||
} | ||
export const PenaltyEvent = ({ event }: PenaltyEventProps) => ( | ||
<Flex alignItems="center" gap={2}> | ||
<Flex alignItems="center" gap={1}> | ||
<CustomIcon | ||
name="alert-triangle" | ||
color={event.isJailed ? "warning.main" : "error.main"} | ||
/> | ||
<Text variant="body2" color="text.main"> | ||
{event.isJailed ? "Jailed" : "Slashed"} at block height | ||
</Text> | ||
<ExplorerLink | ||
type="block_height" | ||
value={event.height.toString()} | ||
showCopyOnHover | ||
/> | ||
</Flex> | ||
</Flex> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
src/lib/pages/validator-details/components/performance/PenaltyStatusSection.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.