From ce7035298d28b57007e96252b4df435d8a02d20c Mon Sep 17 00:00:00 2001 From: Sergej Date: Fri, 4 Oct 2024 15:49:25 +0200 Subject: [PATCH] regions fix --- package.json | 2 +- src/components/Regions/RegionMetaCard/index.tsx | 2 +- src/pages/regions.tsx | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 09780a14..28eb76c9 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@polkadot/ui-keyring": "3.6.6", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "^12.6.2", - "@region-x/components": "^0.1.14", + "@region-x/components": "^0.1.15", "@types/humanize-duration": "^3.27.3", "@vercel/analytics": "^1.2.2", "apexcharts": "^3.49.1", diff --git a/src/components/Regions/RegionMetaCard/index.tsx b/src/components/Regions/RegionMetaCard/index.tsx index 97417d67..bee52ab0 100644 --- a/src/components/Regions/RegionMetaCard/index.tsx +++ b/src/components/Regions/RegionMetaCard/index.tsx @@ -72,7 +72,7 @@ export const RegionMetaCard = ({ active, regionMetadata }: RegionMetaCardProps) regionStart: getRelativeTimeString(beginTimestamp), regionEnd: getRelativeTimeString(endTimestamp), coreIndex: region.getCore(), - consumed: regionMetadata.consumed, + consumed: Number(parseFloat((regionMetadata.consumed * 100).toString()).toFixed(2)), chainLabel: locationToLabel(location), chainColor: location === RegionLocation.CORETIME_CHAIN ? 'purpleDark' : 'blueDark', coreOcupaccy: regionMetadata.coreOccupancy * 100, diff --git a/src/pages/regions.tsx b/src/pages/regions.tsx index a2f8a686..8937a4c6 100644 --- a/src/pages/regions.tsx +++ b/src/pages/regions.tsx @@ -147,13 +147,14 @@ const Dashboard = () => { > {status !== ContextStatus.LOADED && (