-
+
+
+
+
+
+ Go back to Subnets list
+
+ {sbnt.subnetMetadata && (
+
+
+ View More
+
+ )}
+
+
+ {sbnt.name}
+ {" "}
+ / NETUID: {sbnt.netuid}
+
+
);
}
@@ -88,7 +75,6 @@ function SubnetDataGrid({ subnet }: { subnet: Subnet }) {
{ label: "Subnet ID", value: subnet.id },
{ label: "Netuid", value: subnet.netuid },
{ label: "Name", value: subnet.name },
- { label: "At Block", value: subnet.atBlock },
{ label: "Tempo", value: subnet.tempo },
{ label: "Founder", value: smallAddress(subnet.founder) },
],
@@ -112,7 +98,10 @@ function SubnetDataGrid({ subnet }: { subnet: Subnet }) {
fields: [
{ label: "Founder Share", value: subnet.founderShare },
{ label: "Incentive Ratio", value: subnet.incentiveRatio },
- { label: "Subnet Emission", value: subnet.subnetEmission.toString() },
+ {
+ label: "Subnet Emission",
+ value: `${formatToken(BigInt(subnet.subnetEmission))} COMAI`,
+ },
{ label: "Bonds MA", value: subnet.bondsMa },
{ label: "Immunity Period", value: subnet.immunityPeriod },
],
@@ -120,7 +109,10 @@ function SubnetDataGrid({ subnet }: { subnet: Subnet }) {
{
title: "Governance Configuration",
fields: [
- { label: "Proposal Cost", value: subnet.proposalCost.toString() },
+ {
+ label: "Proposal Cost",
+ value: `${formatToken(BigInt(subnet.proposalCost))} COMAI`,
+ },
{ label: "Proposal Expiration", value: subnet.proposalExpiration },
{ label: "Vote Mode", value: subnet.voteMode },
{
@@ -129,7 +121,7 @@ function SubnetDataGrid({ subnet }: { subnet: Subnet }) {
},
{
label: "Max Proposal Reward Treasury Allocation",
- value: subnet.maxProposalRewardTreasuryAllocation.toString(),
+ value: `${formatToken(BigInt(subnet.maxProposalRewardTreasuryAllocation))} COMAI`,
},
{
label: "Proposal Reward Interval",
@@ -140,9 +132,18 @@ function SubnetDataGrid({ subnet }: { subnet: Subnet }) {
{
title: "Burn Configuration",
fields: [
- { label: "Min Burn", value: subnet.minBurn.toString() },
- { label: "Max Burn", value: subnet.maxBurn.toString() },
- { label: "Adjustment Alpha", value: subnet.adjustmentAlpha },
+ {
+ label: "Min Burn",
+ value: `${formatToken(BigInt(subnet.minBurn))} COMAI`,
+ },
+ {
+ label: "Max Burn",
+ value: `${formatToken(BigInt(subnet.maxBurn))} COMAI`,
+ },
+ {
+ label: "Adjustment Alpha",
+ value: subnet.adjustmentAlpha,
+ },
{
label: "Target Registrations Interval",
value: subnet.targetRegistrationsInterval,
@@ -160,27 +161,18 @@ function SubnetDataGrid({ subnet }: { subnet: Subnet }) {
{
title: "Additional Information",
fields: [
+ { label: "At Block", value: subnet.atBlock },
{
label: "Min Validator Stake",
- value: subnet.minValidatorStake?.toString(),
+ value: `${formatToken(subnet.minValidatorStake ?? 0)} COMAI`,
},
{ label: "Max Allowed Validators", value: subnet.maxAllowedValidators },
- {
- label: "Created At",
- value: new Date(subnet.createdAt).toLocaleString(),
- },
- {
- label: "Deleted At",
- value: subnet.deletedAt
- ? new Date(subnet.deletedAt).toLocaleString()
- : "N/A",
- },
],
},
];
return (
-
+
{dataGroups.map((group, index) => (
{data.map((subnet) => (
-
+
{weightedModules.length ? (
{weightedModules.map((module) => (
@@ -39,6 +39,6 @@ export default function Page() {
No weighted modules found.
)}
- >
+
);
}
diff --git a/apps/commune-validator/src/app/(pages)/weighted-subnets/page.tsx b/apps/commune-validator/src/app/(pages)/weighted-subnets/page.tsx
index 7776b20b..eeb5f565 100644
--- a/apps/commune-validator/src/app/(pages)/weighted-subnets/page.tsx
+++ b/apps/commune-validator/src/app/(pages)/weighted-subnets/page.tsx
@@ -2,7 +2,7 @@
import { useCommune } from "@commune-ts/providers/use-commune";
-import SubnetAccordion from "~/app/components/subnet-accordion";
+import SubnetCard from "~/app/components/subnet-card";
import { useDelegateSubnetStore } from "~/stores/delegateSubnetStore";
export default function Page() {
@@ -21,11 +21,11 @@ export default function Page() {
);
return (
- <>
+
{weightedSubnets.length ? (
{weightedSubnets.map((subnet) => (
-
)}
- >
+
);
}
diff --git a/apps/commune-validator/src/app/components/subnet-accordion.tsx b/apps/commune-validator/src/app/components/subnet-card.tsx
similarity index 65%
rename from apps/commune-validator/src/app/components/subnet-accordion.tsx
rename to apps/commune-validator/src/app/components/subnet-card.tsx
index da3ffa87..813c2acb 100644
--- a/apps/commune-validator/src/app/components/subnet-accordion.tsx
+++ b/apps/commune-validator/src/app/components/subnet-card.tsx
@@ -1,30 +1,27 @@
"use client";
import { useState } from "react";
-import { ChevronUpIcon } from "@heroicons/react/16/solid";
+import Link from "next/link";
+import { ArrowRightIcon, ChevronUpIcon } from "@heroicons/react/16/solid";
import { smallAddress } from "@commune-ts/utils";
import { useDelegateSubnetStore } from "~/stores/delegateSubnetStore";
import { DelegateSubnetWeight } from "./delegate-subnet-weight";
-interface SubnetAccordionWeightProps {
+interface SubnetCardWeightProps {
id: number;
name: string;
founderAddress: string;
percentage?: number;
}
-export default function SubnetAccordion({
+export default function SubnetCard({
id,
name,
founderAddress,
percentage,
-}: SubnetAccordionWeightProps) {
- const [isOpen, setIsOpen] = useState(false);
-
- const toggleAccordion = () => setIsOpen(!isOpen);
-
+}: SubnetCardWeightProps) {
const { delegatedSubnets } = useDelegateSubnetStore();
const isSubnetDelegated = delegatedSubnets.some((s) => s.id === id);
@@ -45,19 +42,12 @@ export default function SubnetAccordion({
name={name}
founderAddress={founderAddress}
/>
-
+ View More
+