Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add active below threshold trait #1773

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/namadillo/src/App/Staking/MyValidatorsFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export const MyValidatorsFilter = ({
value: "Active",
ariaLabel: "Active",
},
{
id: "belowThreshold",
value: "Active Below Threshold",
ariaLabel: "Active Below Threshold",
},
{
id: "jailed",
value: "Jailed",
Expand Down
10 changes: 5 additions & 5 deletions apps/namadillo/src/App/Staking/ValidatorRank.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export const ValidatorRank = ({
return <span className={clsx(className)}>#{rank}</span>; // TODO: implement rank
}

if (
status === "unknown" ||
status === "belowCapacity" ||
status === "belowThreshold"
) {
if (status === "belowThreshold") {
return <span className={clsx(className)}>#{rank}</span>;
}

if (status === "unknown" || status === "belowCapacity") {
return <span className={clsx(className)}>&mdash;</span>;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ describe("Component: ValidatorRank", () => {
assertDashIsPresent();
});

test("displays em dash when status is belowThreshold", () => {
test("displays rank when status is belowThreshold", () => {
render(<ValidatorRank rank={rank} status="belowThreshold" />);
assertDashIsPresent();
assertContentIsPresent();
});

test("displays semi transparent number when status is inactive", () => {
Expand Down
Loading