Data Related
-
Data packaged: {minorState.data_packaged}
- {minorState.data_unpackaged ? (
-
Data unpackaged: {minorState.data_unpackaged}
- ) : null}
+
Hash Rate
diff --git a/renderer/types/Charts.ts b/renderer/types/Charts.ts
new file mode 100644
index 0000000..081a853
--- /dev/null
+++ b/renderer/types/Charts.ts
@@ -0,0 +1,26 @@
+export type DataRelatedChart = {
+ data_package: {
+ size: number;
+ unit: string;
+ };
+ storage_available: {
+ size: number;
+ unit: string;
+ };
+ total_size: {
+ size: number;
+ unit: string;
+ };
+};
+
+export type TopArrow = {
+ value: number;
+ unit: string;
+ color: string;
+};
+
+export type BottomArrow = {
+ value: number;
+ unit: string;
+ color: string;
+};
diff --git a/renderer/types/Minor.ts b/renderer/types/Minor.ts
index d1c0fcc..4c1af70 100644
--- a/renderer/types/Minor.ts
+++ b/renderer/types/Minor.ts
@@ -9,3 +9,11 @@ export type MinorParser = {
};
}[];
};
+
+export type Metrics = {
+ data_packaged: number;
+ data_unpackaged: number;
+ earnings: number;
+ hash_rate: number;
+ vdf_time_lower_bound: number;
+};
diff --git a/renderer/util/minor.ts b/renderer/util/minor.ts
new file mode 100644
index 0000000..57cdff2
--- /dev/null
+++ b/renderer/util/minor.ts
@@ -0,0 +1,4 @@
+export function convertToGbFromPetabytes(value: number): number {
+ const gigabytes = value * 1e9; // 1 petabyte = 1e9 gigabytes
+ return parseFloat(gigabytes.toFixed(2));
+}