diff --git a/client/src/assets/kadena-kda-logo.png b/client/src/assets/kadena-kda-logo.png index 6d38e8b..880585d 100644 Binary files a/client/src/assets/kadena-kda-logo.png and b/client/src/assets/kadena-kda-logo.png differ diff --git a/client/src/components/NodeGridTable/CustomTooltip.jsx b/client/src/components/NodeGridTable/CustomTooltip.jsx index 4b657f9..e2011a7 100644 --- a/client/src/components/NodeGridTable/CustomTooltip.jsx +++ b/client/src/components/NodeGridTable/CustomTooltip.jsx @@ -1,6 +1,6 @@ import { Tooltip2 } from '@blueprintjs/popover2'; import { fluxos_version_string } from 'main/flux_version'; -import { gethelp, getreq__cumulus, getreq__nimbus, getreq__stratus, getreq__fractus } from 'content/index'; +import { gethelp, getreq__cumulus, getreq__nimbus, getreq__stratus } from 'content/index'; export const CustomTooltip = ({ componentName, displayName, gstore }) => { let Component; @@ -308,12 +308,5 @@ const InlineRequirementsView = (name, suffix) => ( {suffix} - - Fractus - - {getreq__fractus(name)} - {suffix} - - ); diff --git a/client/src/components/NodeGridTable/index.jsx b/client/src/components/NodeGridTable/index.jsx index d5a5ce1..681b6f5 100644 --- a/client/src/components/NodeGridTable/index.jsx +++ b/client/src/components/NodeGridTable/index.jsx @@ -181,7 +181,7 @@ export const NodeGridTable = ({ headerName: 'Uptime', filter: 'agNumberColumnFilter', cellRenderer: 'uptimeCell', - width: '150px', + width: 150, minWidth: 100 }, { field: 'score', headerName: 'Score', filter: 'agTextColumnFilter' }, @@ -246,7 +246,7 @@ export const NodeGridTable = ({ onFirstDataRendered={autoSizeAll} maintainColumnOrder={true} overlayNoRowsTemplate={'No Nodes'} - frameworkComponents={{ + components={{ ipCell: IpCell, tierCell: TierCell, benchmarkCell: BenchmarkCell, diff --git a/client/src/content/index.js b/client/src/content/index.js index 9eda8bc..609559c 100644 --- a/client/src/content/index.js +++ b/client/src/content/index.js @@ -1,6 +1,6 @@ import * as r from './internal/req_helpers'; import { fluxos_version_desc_parse } from 'main/flux_version'; -export { gethelp, getreq, getreq__cumulus, getreq__nimbus, getreq__stratus, getreq__fractus } from './internal/req_helpers'; +export { gethelp, getreq, getreq__cumulus, getreq__nimbus, getreq__stratus} from './internal/req_helpers'; export const URL_YOUTUBE = window.gContent.URL_YOUTUBE; export const URL_TWITTER = window.gContent.URL_TWITTER; @@ -25,13 +25,13 @@ r.defreq_wrap('net_up_speed', _reqsObj['net_up_speed']); export const CC_COLLATERAL_CUMULUS = window.gContent.CC_COLLATERAL_CUMULUS; export const CC_COLLATERAL_NIMBUS = window.gContent.CC_COLLATERAL_NIMBUS; export const CC_COLLATERAL_STRATUS = window.gContent.CC_COLLATERAL_STRATUS; -export const CC_COLLATERAL_FRACTUS = window.gContent.CC_COLLATERAL_FRACTUS; +//export const CC_COLLATERAL_FRACTUS = window.gContent.CC_COLLATERAL_FRACTUS; export const CC_BLOCK_REWARD = window.gContent.CC_BLOCK_REWARD; export const CC_FLUX_REWARD_CUMULUS = window.gContent.CC_FLUX_REWARD_CUMULUS; export const CC_FLUX_REWARD_NIMBUS = window.gContent.CC_FLUX_REWARD_NIMBUS; export const CC_FLUX_REWARD_STRATUS = window.gContent.CC_FLUX_REWARD_STRATUS; -export const CC_FLUX_REWARD_FRACTUS = window.gContent.CC_FLUX_REWARD_FRACTUS; +//export const CC_FLUX_REWARD_FRACTUS = window.gContent.CC_FLUX_REWARD_FRACTUS; export const CC_PA_REWARD = window.gContent.CC_PA_REWARD; // export const LATEST_FLUX_VERSION_DESC = fluxos_version_desc_parse(window.gContent.LATEST_FLUX_VERSION); diff --git a/client/src/content/internal/req_helpers.jsx b/client/src/content/internal/req_helpers.jsx index cf5a51e..04fc8d5 100644 --- a/client/src/content/internal/req_helpers.jsx +++ b/client/src/content/internal/req_helpers.jsx @@ -4,7 +4,7 @@ export const reqs = { cumulus: {}, nimbus: {}, stratus: {}, - fractus: {} + //fractus: {} }; export function defhelp(name, desc) { @@ -25,7 +25,7 @@ export function defreq_wrap(name, values_obj) { defreq('cumulus', name, values_obj['C']); defreq('nimbus', name, values_obj['N']); defreq('stratus', name, values_obj['S']); - defreq('fractus', name, values_obj['F']); + //defreq('fractus', name, values_obj['F']); } export function gethelp(name) { @@ -43,7 +43,7 @@ export function getreq(tier, name) { export const getreq__cumulus = (name) => getreq('cumulus', name); export const getreq__nimbus = (name) => getreq('nimbus', name); export const getreq__stratus = (name) => getreq('stratus', name); -export const getreq__fractus = (name) => getreq('fractus', name); +//export const getreq__fractus = (name) => getreq('fractus', name); /* Help Information to show on toolips */ diff --git a/client/src/demo/Demo.jsx b/client/src/demo/Demo.jsx index 275a60c..12e9e0b 100644 --- a/client/src/demo/Demo.jsx +++ b/client/src/demo/Demo.jsx @@ -4,7 +4,7 @@ import { AppToaster } from 'main/AppToaster'; import { Intent, Spinner } from '@blueprintjs/core'; import { getDemoWallet } from '../main/apidata'; import FailedToLoadDemo from './FailedToLoadDemo'; -import { setGAEvent, setGAPageView } from 'g-analytic'; +//import { setGAEvent, setGAPageView } from 'g-analytic'; class Demo extends React.Component { constructor(props) { @@ -28,8 +28,8 @@ class Demo extends React.Component { }); } if (window) { - setGAEvent({ category: 'Demo page', action: 'visit' }); - setGAPageView(window.location.pathname); + //setGAEvent({ category: 'Demo page', action: 'visit' }); + //setGAPageView(window.location.pathname); } } diff --git a/client/src/guides/GuidesView.jsx b/client/src/guides/GuidesView.jsx index 049b91d..307fab8 100644 --- a/client/src/guides/GuidesView.jsx +++ b/client/src/guides/GuidesView.jsx @@ -11,16 +11,16 @@ import Accordion from 'react-bootstrap/Accordion'; import { FooterRendered } from 'components/Footer'; -import { RequirementsCumulus, RequirementsNimbus, RequirementsStratus, RequirementsFractus } from './NodeRequirements'; +import { RequirementsCumulus, RequirementsNimbus, RequirementsStratus } from './NodeRequirements'; import { Container, Row, Col } from 'react-grid-system'; -import { setGAEvent, setGAPageView } from 'g-analytic'; +//import { setGAEvent, setGAPageView } from 'g-analytic'; class AppGuidesView extends React.Component { componentDidMount() { if (window) { - setGAPageView(window.location.pathname); - setGAEvent({ category: 'GuidesPage', action: 'visit' }) + //setGAPageView(window.location.pathname); + //setGAEvent({ category: 'GuidesPage', action: 'visit' }) } } diff --git a/client/src/guides/NodeRequirements/index.jsx b/client/src/guides/NodeRequirements/index.jsx index 1e8e121..612d691 100644 --- a/client/src/guides/NodeRequirements/index.jsx +++ b/client/src/guides/NodeRequirements/index.jsx @@ -3,8 +3,8 @@ import './index.scss'; import { Card, Divider, Icon } from '@blueprintjs/core'; -import { gethelp, getreq__cumulus, getreq__nimbus, getreq__stratus, getreq__fractus } from 'content/index'; -import { CC_COLLATERAL_CUMULUS, CC_COLLATERAL_NIMBUS, CC_COLLATERAL_STRATUS, CC_COLLATERAL_FRACTUS } from 'content/index'; +import { gethelp, getreq__cumulus, getreq__nimbus, getreq__stratus } from 'content/index'; +import { CC_COLLATERAL_CUMULUS, CC_COLLATERAL_NIMBUS, CC_COLLATERAL_STRATUS } from 'content/index'; /* https://stackoverflow.com/a/2901298 */ function numberWithCommas(x) { @@ -104,6 +104,7 @@ export const RequirementsStratus = ( /> ); +/* export const RequirementsFractus = ( ); +*/ diff --git a/client/src/home/Header/index.jsx b/client/src/home/Header/index.jsx index 50dbf39..d8572f4 100644 --- a/client/src/home/Header/index.jsx +++ b/client/src/home/Header/index.jsx @@ -9,7 +9,7 @@ import { FiCpu, FiHardDrive, FiPackage, FiZap } from 'react-icons/fi'; import { FaWallet, FaWordpress, FaRocket, FaHive } from 'react-icons/fa'; import { LayoutContext } from 'contexts/LayoutContext'; -import { useContext, useState } from 'react'; +import { useContext } from 'react'; import 'react-circular-progressbar/dist/styles.css'; import { RadialCircularProgressbar } from 'components/RadialCircularProgressbar'; @@ -105,7 +105,6 @@ function CellTooltip({ children, tooltipContent }) { } export function DashboardCells({ gstore: gs, total_donations }) { - const [enableFractusNodesCell, setToggleFractusNodesCell] = useState(false); const { normalFontSize } = useContext(LayoutContext); const iconSize = normalFontSize ? '28px' : '22px'; @@ -189,40 +188,22 @@ export function DashboardCells({ gstore: gs, total_donations }) { )} - }> + {(ref, tooltipProps) => ( + } + iconWrapClassName={`dash-cell__nodes-cumulus${suffixClassName}`} + small={!normalFontSize} + cellHover /> - } - > - {(ref, tooltipProps) => { - const cellProps = enableFractusNodesCell - ? { - name: 'Fractus Nodes', - value: gs.node_count.fractus, - icon: , - iconWrapClassName: `dash-cell__nodes-fractus${suffixClassName}` - } - : { - name: 'Cumulus Nodes', - value: gs.node_count.cumulus, - icon: , - iconWrapClassName: `dash-cell__nodes-cumulus${suffixClassName}` - }; - - return ( - setToggleFractusNodesCell((prev) => !prev)} - /> - ); - }} + )} + }> {(ref, tooltipProps) => ( )} + }> {(ref, tooltipProps) => ( @@ -284,6 +265,7 @@ export function DashboardCells({ gstore: gs, total_donations }) { /> )} + } > @@ -307,7 +289,6 @@ export function DashboardCells({ gstore: gs, total_donations }) { radialSeparatorStyles={{ background: '#181a1b', width: '2px', - // This needs to be equal to props.strokeWidth height: `${8}%` }} /> @@ -318,6 +299,7 @@ export function DashboardCells({ gstore: gs, total_donations }) { /> )} + } > @@ -341,7 +323,6 @@ export function DashboardCells({ gstore: gs, total_donations }) { radialSeparatorStyles={{ background: '#181a1b', width: '2px', - // This needs to be equal to props.strokeWidth height: `${8}%` }} /> @@ -352,6 +333,7 @@ export function DashboardCells({ gstore: gs, total_donations }) { /> )} + } > @@ -375,7 +357,6 @@ export function DashboardCells({ gstore: gs, total_donations }) { radialSeparatorStyles={{ background: '#181a1b', width: '2px', - // This needs to be equal to props.strokeWidth height: `${8}%` }} /> @@ -386,6 +367,7 @@ export function DashboardCells({ gstore: gs, total_donations }) { /> )} + { - const res = await fetch(FLUXNODE_INFO_API_URL + '/api/v1/bench-version', { ...REQUEST_OPTIONS_API }); + try { + const res = await fetch('https://raw.githubusercontent.com/RunOnFlux/flux/refs/heads/master/helpers/benchmarkinfo.json'); if (res.status === 200) { const json = await res.json(); store.bench_latest_version = fluxos_version_desc_parse(json.version); } - }; + } catch (error) { + console.log('Failed to fetch benchmark version:', error); + // store.bench_latest_version will remain at default (0, 0, 0) + } +}; const fetchBlockHeight = async () => { const res = await fetch('https://api.runonflux.io/daemon/getinfo'); @@ -486,7 +496,7 @@ export function wallet_health_full() { cumulus: wallet_health_entry(), nimbus: wallet_health_entry(), stratus: wallet_health_entry(), - fractus: wallet_health_entry(), + //fractus: wallet_health_entry(), total_nodes: 0 }; } @@ -754,7 +764,7 @@ export function fill_health(health, gstore) { fill_tier_health(health.nimbus, gstore.reward_projections.nimbus, gstore.flux_price_usd); fill_tier_health(health.stratus, gstore.reward_projections.stratus, gstore.flux_price_usd); // Fractus is parts of Cumulus tier - fill_tier_health(health.fractus, gstore.reward_projections.fractus, gstore.flux_price_usd); + //fill_tier_health(health.fractus, gstore.reward_projections.fractus, gstore.flux_price_usd); } export async function validateAddress(address) { @@ -822,6 +832,7 @@ export async function lazy_load_currency_rate() { /* ======================================================================= */ /* =========================== Fractus Count =========================== */ +/* async function lazy_load_fractus_count(benchmarks) { try { const storedFractusCount = await appStore.getItem(StoreKeys.FRACTUS_COUNT); diff --git a/client/src/main/BestUptime/index.jsx b/client/src/main/BestUptime/index.jsx index d26c155..d8f5457 100644 --- a/client/src/main/BestUptime/index.jsx +++ b/client/src/main/BestUptime/index.jsx @@ -28,11 +28,13 @@ const tierMapping = { name: 'Stratus', logo: FiPackage }, + /* FRACTUS: { styleSet: 'fractus', name: 'Fractus', logo: FiHardDrive } + */ }; export class BestUptime extends React.Component { @@ -67,7 +69,7 @@ export class BestUptime extends React.Component { hidden: false, nodeIpDef: node.ip_full, nodeIp: node.ip_display, - nodeTier: node.thunder ? 'FRACTUS' : node.tier + //nodeTier: node.thunder ? 'FRACTUS' : node.tier }); } diff --git a/client/src/main/Header/index.jsx b/client/src/main/Header/index.jsx index 9bfbfb3..8788dd5 100644 --- a/client/src/main/Header/index.jsx +++ b/client/src/main/Header/index.jsx @@ -6,14 +6,13 @@ import './index.scss'; import { FluxIcon } from 'components/FluxIcon.jsx'; import { InfoCell } from 'main/InfoCell'; -// import { LATEST_FLUX_VERSION_DESC } from 'content/index'; import { FiCpu, FiDollarSign, FiHardDrive, FiHash, FiPackage, FiZap } from 'react-icons/fi'; import { FaCrown, FaWallet, FaEuroSign } from 'react-icons/fa'; import { LayoutContext } from 'contexts/LayoutContext'; import { fluxos_version_string } from 'main/flux_version'; -import { useContext, useState } from 'react'; +import { useContext } from 'react'; import { CircularProgressbar } from 'react-circular-progressbar'; import 'react-circular-progressbar/dist/styles.css'; @@ -140,7 +139,6 @@ function CellTooltip({ children, tooltipContent }) { const RenderedFluxIcon = ({ width, height }) => ; export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstSearchedWallet }) { - const [enableFractusNodesCell, setToggleFractusNodesCell] = useState(false); const { normalFontSize, enablePrivacyMode } = useContext(LayoutContext); const iconSize = normalFontSize ? '28px' : '22px'; @@ -149,8 +147,6 @@ export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstS const walletType = gs.in_rich_list ? 'richlist' : total_donations > 0 ? 'donate' : 'default'; const walletCellStyles = WALLET_CELL_ATTRIBUTES[walletType]; - - // console.log("totalScoreAgainstSearchedWallet", totalScoreAgainstSearchedWallet) return (
@@ -181,40 +177,23 @@ export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstS /> )} - - } - > - {(ref, tooltipProps) => { - const cellProps = enableFractusNodesCell - ? { - name: 'Fractus Nodes', - value: gs.node_count.fractus, - icon: , - iconWrapClassName: `dash-cell__nodes-fractus${suffixClassName}` - } - : { - name: 'Cumulus Nodes', - value: gs.node_count.cumulus, - icon: , - iconWrapClassName: `dash-cell__nodes-cumulus${suffixClassName}` - }; - return ( - setToggleFractusNodesCell((prev) => !prev)} - /> - ); - }} + {/* Cumulus Node Cell - No longer toggleable */} + }> + {(ref, tooltipProps) => ( + } + iconWrapClassName={`dash-cell__nodes-cumulus${suffixClassName}`} + small={!normalFontSize} + cellHover + /> + )} + }> {(ref, tooltipProps) => ( )} + }> {(ref, tooltipProps) => ( )} + }> {(ref, tooltipProps) => ( )} + }> {(ref, tooltipProps) => ( @@ -306,6 +287,7 @@ export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstS /> )} + } > @@ -329,7 +311,6 @@ export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstS radialSeparatorStyles={{ background: '#181a1b', width: '2px', - // This needs to be equal to props.strokeWidth height: `${8}%` }} /> @@ -340,6 +321,7 @@ export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstS /> )} + } > @@ -363,7 +345,6 @@ export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstS radialSeparatorStyles={{ background: '#181a1b', width: '2px', - // This needs to be equal to props.strokeWidth height: `${8}%` }} /> @@ -374,6 +355,7 @@ export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstS /> )} + } > @@ -397,7 +379,6 @@ export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstS radialSeparatorStyles={{ background: '#181a1b', width: '2px', - // This needs to be equal to props.strokeWidth height: `${8}%` }} /> @@ -413,4 +394,4 @@ export function DashboardCells({ gstore: gs, total_donations, totalScoreAgainstS
); -} +} \ No newline at end of file diff --git a/client/src/main/MainApp.jsx b/client/src/main/MainApp.jsx index f080feb..0bbc139 100644 --- a/client/src/main/MainApp.jsx +++ b/client/src/main/MainApp.jsx @@ -38,7 +38,7 @@ import { appStore, StoreKeys } from 'persistance/store'; import { LayoutContext } from 'contexts/LayoutContext'; import { blurAllInputs, hide_sensitive_string } from 'utils'; import { FaMedal } from 'react-icons/fa'; -import { setGAEvent } from 'g-analytic'; +//import { setGAEvent } from 'g-analytic'; const WALLET_INPUT_ID = '_WALLET_INPUT_'; const SEARCH_HISTORY_BOX_CLASS = '_SEARCH_HISTORY_BOX_'; @@ -348,7 +348,7 @@ class MainApp extends React.Component { handleButtonClick = () => { this.onProcessAddress(); - setGAEvent({ category: 'Search Wallet Button', action: 'Click search wallet button' }); + //setGAEvent({ category: 'Search Wallet Button', action: 'Click search wallet button' }); this.props.router.navigate(`/nodes?wallet=${this.addressInputRef.current.value}`); }; diff --git a/client/src/main/MostHosted/index.jsx b/client/src/main/MostHosted/index.jsx index 09446c6..9bbc1f2 100644 --- a/client/src/main/MostHosted/index.jsx +++ b/client/src/main/MostHosted/index.jsx @@ -27,11 +27,13 @@ const tierMapping = { name: 'Stratus', logo: FiPackage }, + /* FRACTUS: { styleSet: 'fractus', name: 'Fractus', logo: FiHardDrive } + */ }; export class MostHosted extends React.Component { @@ -68,7 +70,7 @@ export class MostHosted extends React.Component { dataLoading: false, nodeIpDef: node.ip_full, nodeIp: node.ip_display, - nodeTier: node.thunder ? 'FRACTUS' : node.tier + //nodeTier: node.thunder ? 'FRACTUS' : node.tier }); } diff --git a/client/src/main/ParallelAssets/index.scss b/client/src/main/ParallelAssets/index.scss index dd99a9f..d891079 100644 --- a/client/src/main/ParallelAssets/index.scss +++ b/client/src/main/ParallelAssets/index.scss @@ -192,18 +192,18 @@ $asset-logo-banner-height: $asset-logo-top-padding + $asset-logo-circle-radius; kda, linear-gradient( 30deg, - hsl(325deg 90% 44%) 0%, - hsl(323deg 68% 51%) 14%, - hsl(319deg 64% 55%) 29%, - hsl(314deg 59% 57%) 45%, - hsl(306deg 54% 60%) 62%, - hsl(296deg 52% 63%) 75%, - hsl(285deg 60% 68%) 84%, - hsl(275deg 69% 73%) 91%, - hsl(264deg 80% 77%) 96%, - hsl(254deg 94% 81%) 100% + hsl(110deg 90% 44%) 0%, /* Deep green */ + hsl(112deg 68% 51%) 14%, /* Rich green */ + hsl(115deg 64% 55%) 29%, /* Mid green */ + hsl(118deg 59% 57%) 45%, /* Bright green */ + hsl(105deg 54% 60%) 62%, /* Yellow-green */ + hsl(95deg 52% 63%) 75%, /* Light yellow-green */ + hsl(88deg 60% 68%) 84%, /* Pale yellow-green */ + hsl(82deg 69% 73%) 91%, /* Very light green */ + hsl(75deg 80% 77%) 96%, /* Near white-green */ + hsl(70deg 94% 81%) 100% /* Lightest green */ ), - #ed098f + #98ed09 ); @include def-pa-block( diff --git a/client/src/main/PayoutTimer/index.jsx b/client/src/main/PayoutTimer/index.jsx index e886568..b92e8ea 100644 --- a/client/src/main/PayoutTimer/index.jsx +++ b/client/src/main/PayoutTimer/index.jsx @@ -28,11 +28,14 @@ const tierMapping = { name: 'Stratus', logo: FiPackage }, + + /* FRACTUS: { styleSet: 'fractus', name: 'Fractus', logo: FiHardDrive } + */ }; export class PayoutTimer extends React.Component { @@ -99,7 +102,7 @@ export class PayoutTimer extends React.Component { dataLoading: false, nodeIpDef: node.ip_full, nodeIp: node.ip_display, - nodeTier: node.thunder ? 'FRACTUS' : node.tier + //nodeTier: node.thunder ? 'FRACTUS' : node.tier }, () => { _this.resumeAndShow(); diff --git a/client/src/main/WalletNodes/Projection.jsx b/client/src/main/WalletNodes/Projection.jsx index f611fcc..bc7d9e8 100644 --- a/client/src/main/WalletNodes/Projection.jsx +++ b/client/src/main/WalletNodes/Projection.jsx @@ -128,10 +128,10 @@ export class Projection extends React.Component { let earningCumulus = this.projectionValue(this.props.health.cumulus); let earningNimbus = this.projectionValue(this.props.health.nimbus); let earningStratus = this.projectionValue(this.props.health.stratus); - let earningFractus = this.projectionValue(this.props.health.fractus); - - let earningTotal = earningCumulus + earningNimbus + earningStratus + earningFractus; + //let earningFractus = this.projectionValue(this.props.health.fractus); + //let earningTotal = earningCumulus + earningNimbus + earningStratus + earningFractus; + let earningTotal = earningCumulus + earningNimbus + earningStratus; return ( {({ selectedCurrency }) => ( @@ -203,28 +203,6 @@ export class Projection extends React.Component { -
-
-
- -
-
- Fractus -
-
- - {this.formatEarningValue(earningFractus, selectedCurrency)} - - - {this.viewToggleStatusCurrency(selectedCurrency)} - -
- - Node Count: {this.props.health.fractus.node_count} - -
-
-
Total Earnings
diff --git a/client/src/main/WalletNodes/index.jsx b/client/src/main/WalletNodes/index.jsx index f6f5e51..d9a672f 100644 --- a/client/src/main/WalletNodes/index.jsx +++ b/client/src/main/WalletNodes/index.jsx @@ -15,7 +15,7 @@ import { getEnterpriseNodes } from 'main/apidata'; import { LayoutContext } from 'contexts/LayoutContext'; -import { setGAEvent } from 'g-analytic'; +//import { setGAEvent } from 'g-analytic'; import { NodeGridTable as NodeGridTableV2 } from 'components/NodeGridTable'; import ReactFullscreen from 'react-easyfullscreen'; @@ -135,7 +135,8 @@ export class WalletNodes extends React.Component { switch (tier) { case 'CUMULUS': // Fractus - Thunder: True | Cumulus - Thunder: False - thunder ? health.fractus.node_count++ : health.cumulus.node_count++; + //thunder ? health.fractus.node_count++ : health.cumulus.node_count++; + health.cumulus.node_count++; break; case 'NIMBUS': health.nimbus.node_count++; @@ -154,8 +155,8 @@ export class WalletNodes extends React.Component { } health.total_nodes = - health.cumulus.node_count + health.nimbus.node_count + health.stratus.node_count + health.fractus.node_count; - + //health.cumulus.node_count + health.nimbus.node_count + health.stratus.node_count + health.fractus.node_count; + health.cumulus.node_count + health.nimbus.node_count + health.stratus.node_count; fill_health(health, gstore); this.setState({ loadingHealth: false, health }); @@ -164,7 +165,7 @@ export class WalletNodes extends React.Component { handleRefreshClick = () => { this.props.onRefreshRequest(); - setGAEvent({ category: 'Refresh Button', action: 'Click refresh button' }); + //setGAEvent({ category: 'Refresh Button', action: 'Click refresh button' }); }; renderNodeOverview(loadingWalletNodes, loadingNodeList, onToggleFullScreen) { diff --git a/client/src/main/apidata.js b/client/src/main/apidata.js index 073851e..c40076d 100644 --- a/client/src/main/apidata.js +++ b/client/src/main/apidata.js @@ -10,12 +10,12 @@ import { CC_FLUX_REWARD_CUMULUS, CC_FLUX_REWARD_NIMBUS, CC_FLUX_REWARD_STRATUS, - CC_FLUX_REWARD_FRACTUS, + //CC_FLUX_REWARD_FRACTUS, CC_PA_REWARD, CC_COLLATERAL_CUMULUS, CC_COLLATERAL_NIMBUS, CC_COLLATERAL_STRATUS, - CC_COLLATERAL_FRACTUS + //CC_COLLATERAL_FRACTUS } from 'content/index'; import { appStore, StoreKeys } from 'persistance/store'; @@ -34,7 +34,7 @@ const FLUX_PER_DAY = (24 * 60) * 2; /* 1 flux every 2 minutes */ const CLC_NETWORK_CUMULUS_PER_DAY = FLUX_PER_DAY * ((CC_BLOCK_REWARD * CC_FLUX_REWARD_CUMULUS) / 100.0); const CLC_NETWORK_NIMBUS_PER_DAY = FLUX_PER_DAY * ((CC_BLOCK_REWARD * CC_FLUX_REWARD_NIMBUS) / 100.0); const CLC_NETWORK_STRATUS_PER_DAY = FLUX_PER_DAY * ((CC_BLOCK_REWARD * CC_FLUX_REWARD_STRATUS) / 100.0); -const CLC_NETWORK_FRACTUS_PER_DAY = FLUX_PER_DAY * ((CC_BLOCK_REWARD * CC_FLUX_REWARD_FRACTUS) / 100.0); +//const CLC_NETWORK_FRACTUS_PER_DAY = FLUX_PER_DAY * ((CC_BLOCK_REWARD * CC_FLUX_REWARD_FRACTUS) / 100.0); /* ======= global stats ======= */ @@ -54,14 +54,14 @@ export function create_global_store() { cumulus: 0, nimbus: 0, stratus: 0, - fractus: 0, + //fractus: 0, total: 0 }, reward_projections: { cumulus: tier_global_projections(), nimbus: tier_global_projections(), stratus: tier_global_projections(), - fractus: tier_global_projections() + //fractus: tier_global_projections() }, wallet_amount_flux: 0, fluxos_latest_version: fluxos_version_desc(0, 0, 0), @@ -105,20 +105,22 @@ function fill_tier_g_projection(projectionTargetObj, nodeCount, networkFluxPerDa projectionTargetObj.apy = 100 * (((rewardPerPerson + pa_amount) * 365) / collateral); } +/* Removed fractus function fill_tier_g_projection_fractus(projectionTargetObj, nodeCount, networkFluxPerDay, collateral) { // pay freq = node_count * 2 minutes projectionTargetObj.pay_frequency = nodeCount * 2; - /* ---- */ + const rewardPerPerson = networkFluxPerDay / nodeCount; projectionTargetObj.payment_amount = rewardPerPerson * 1.15; // 15% Native flux - /* ---- */ + const pa_amount = (rewardPerPerson * CC_PA_REWARD) / 100.0; projectionTargetObj.pa_amount = pa_amount; projectionTargetObj.apy = 100 * (((rewardPerPerson * 1.15 + pa_amount) * 365) / collateral); } + */ function fill_rewards(gstore) { fill_tier_g_projection( @@ -139,12 +141,14 @@ function fill_rewards(gstore) { CLC_NETWORK_STRATUS_PER_DAY, CC_COLLATERAL_STRATUS ); + /* removed fractus fill_tier_g_projection_fractus( gstore.reward_projections.fractus, gstore.node_count.cumulus, CLC_NETWORK_FRACTUS_PER_DAY, CC_COLLATERAL_FRACTUS ); + */ } export function fetch_total_donations(walletAddress) { @@ -216,7 +220,7 @@ export async function fetch_total_network_utils(gstore) { store.utilized.ram_percentage = (store.utilized.ram / store.total.ram) * 100; store.utilized.ssd_percentage = (store.utilized.ssd / store.total.ssd) * 100; store.utilized.cores_percentage = (store.utilized.cores / store.total.cores) * 100; - store.node_count.fractus = await lazy_load_fractus_count(json.data); + //store.node_count.fractus = await lazy_load_fractus_count(json.data); } } @@ -263,12 +267,17 @@ export async function fetch_global_stats(walletAddress = null) { }; const fetchFluxVer = async () => { - const res = await fetch(FLUXNODE_INFO_API_URL + '/api/v1/bench-version', { ...REQUEST_OPTIONS_API }); + try { + const res = await fetch('https://raw.githubusercontent.com/RunOnFlux/flux/refs/heads/master/helpers/benchmarkinfo.json'); if (res.status === 200) { const json = await res.json(); store.bench_latest_version = fluxos_version_desc_parse(json.version); } - }; + } catch (error) { + console.log('Failed to fetch benchmark version:', error); + // store.bench_latest_version will remain at default (0, 0, 0) + } +}; const fetchBlockHeight = async () => { const res = await fetch('https://api.runonflux.io/daemon/getinfo'); @@ -313,7 +322,7 @@ export function wallet_health_full() { cumulus: wallet_health_entry(), nimbus: wallet_health_entry(), stratus: wallet_health_entry(), - fractus: wallet_health_entry(), + //fractus: wallet_health_entry(), total_nodes: 0 }; } @@ -596,7 +605,7 @@ export function fill_health(health, gstore) { fill_tier_health(health.nimbus, gstore.reward_projections.nimbus, gstore.flux_price_usd); fill_tier_health(health.stratus, gstore.reward_projections.stratus, gstore.flux_price_usd); // Fractus is parts of Cumulus tier - fill_tier_health(health.fractus, gstore.reward_projections.fractus, gstore.flux_price_usd); + //fill_tier_health(health.fractus, gstore.reward_projections.fractus, gstore.flux_price_usd); } export async function validateAddress(address) { @@ -664,6 +673,7 @@ export async function lazy_load_currency_rate() { /* ======================================================================= */ /* =========================== Fractus Count =========================== */ +/* async function lazy_load_fractus_count(benchmarks) { try { const storedFractusCount = await appStore.getItem(StoreKeys.FRACTUS_COUNT); diff --git a/client/src/persistance/store.js b/client/src/persistance/store.js index 890615e..5329908 100644 --- a/client/src/persistance/store.js +++ b/client/src/persistance/store.js @@ -9,7 +9,7 @@ window.appStore = appStore = localforage.createInstance({ }); export function initStore() { - appStore.removeItem(StoreKeys.FRACTUS_COUNT); + //appStore.removeItem(StoreKeys.FRACTUS_COUNT); appStore.removeItem(StoreKeys.CURRENCY_RATES); } @@ -18,7 +18,7 @@ let StoreKeys = {}; StoreKeys.ADDR_SEARCH_HISTORY = 'history_addrs'; StoreKeys.PRIVACY_MODE = 'privacy_mode'; StoreKeys.NOTABLE_NODES = 'notable_nodes'; -StoreKeys.FRACTUS_COUNT = 'fractus_count'; +//StoreKeys.FRACTUS_COUNT = 'fractus_count'; StoreKeys.CURRENCY_RATES = 'currency_rates'; StoreKeys.GLOBAL_STATS_STORE = 'global_stats_store';