@@ -710,22 +710,66 @@ export function MinerCard({ minerConfig, onRemove, isRemoving, state, updateMine
710710
711711 const hashrateDisplay = useMemo ( ( ) => {
712712 if ( hashrateInGhs >= 1000 ) {
713- return { value : hashrateInGhs / 1000 , unit : 'TH/s' , isFloat : true , max : 3 } ;
713+ // Convert to TH/s for high-power miners
714+ const valueInThs = hashrateInGhs / 1000 ;
715+ // Dynamic max scaling for different miner tiers:
716+ // - Standard BitAxe: up to 1.5 TH/s
717+ // - NerdAxeQ++, Magic Miner BG01/BG02: up to 7 TH/s
718+ // - Canaan Nano S and larger: up to 10+ TH/s
719+ let max : number ;
720+ if ( valueInThs <= 1.5 ) {
721+ max = 2 ; // Small TH/s miners (standard BitAxe overclocked)
722+ } else if ( valueInThs <= 3 ) {
723+ max = 4 ; // Mid-range TH/s miners
724+ } else if ( valueInThs <= 5 ) {
725+ max = 6 ; // Higher-end miners like some Magic Miner models
726+ } else if ( valueInThs <= 7 ) {
727+ max = 8 ; // NerdAxeQ++, Magic Miner BG01/BG02
728+ } else if ( valueInThs <= 10 ) {
729+ max = 12 ; // Canaan Nano S range
730+ } else if ( valueInThs <= 20 ) {
731+ max = 25 ; // Larger miners
732+ } else {
733+ // For very high hashrates, round up to next 10 TH/s
734+ max = Math . ceil ( valueInThs / 10 ) * 10 + 5 ;
735+ }
736+ return { value : valueInThs , unit : 'TH/s' , isFloat : true , max } ;
737+ }
738+ // GH/s mode - also make max dynamic for better gauge utilization
739+ let max : number ;
740+ if ( hashrateInGhs <= 500 ) {
741+ max = 600 ; // Low-power miners
742+ } else if ( hashrateInGhs <= 800 ) {
743+ max = 1000 ; // Standard BitAxe range
744+ } else {
745+ max = 1200 ; // High-end GH/s range (approaching TH/s)
714746 }
715- return { value : hashrateInGhs , unit : 'GH/s' , isFloat : false , max : 3000 } ;
747+ return { value : hashrateInGhs , unit : 'GH/s' , isFloat : false , max } ;
716748 } , [ hashrateInGhs ] ) ;
717749
718750 const freq = state . info ?. frequency ?? 0 ;
719751 const cardTitle = minerConfig . name || state . info ?. hostname || minerConfig . ip ;
720752 const cardDescription = minerConfig . name ? minerConfig . ip : ( state . info ?. hostname ? `v${ state . info . boardVersion } ` : '' ) ;
721753
722754 // Calculate efficiency percentage (actual vs expected hashrate)
723- const efficiencyPercent = useMemo ( ( ) => {
724- if ( state . info ?. hashRate && state . info ?. expectedHashrate && state . info . expectedHashrate > 0 ) {
725- return ( ( state . info . hashRate / state . info . expectedHashrate ) * 100 ) . toFixed ( 1 ) ;
755+ // Uses device-reported expectedHashrate if available, otherwise falls back to estimated value
756+ const efficiencyData = useMemo ( ( ) => {
757+ if ( ! state . info ?. hashRate ) return null ;
758+
759+ // Prefer device-reported expectedHashrate, fall back to estimated
760+ const expectedHashrate = state . info . expectedHashrate || state . info . estimatedExpectedHashrate ;
761+ const isEstimated = ! state . info . expectedHashrate && ! ! state . info . estimatedExpectedHashrate ;
762+
763+ if ( expectedHashrate && expectedHashrate > 0 ) {
764+ return {
765+ percent : ( ( state . info . hashRate / expectedHashrate ) * 100 ) . toFixed ( 1 ) ,
766+ isEstimated
767+ } ;
726768 }
727769 return null ;
728- } , [ state . info ?. hashRate , state . info ?. expectedHashrate ] ) ;
770+ } , [ state . info ?. hashRate , state . info ?. expectedHashrate , state . info ?. estimatedExpectedHashrate ] ) ;
771+
772+ const efficiencyPercent = efficiencyData ?. percent ?? null ;
729773
730774
731775 const StatusBadge = useMemo ( ( ) => {
@@ -815,8 +859,14 @@ export function MinerCard({ minerConfig, onRemove, isRemoving, state, updateMine
815859 < div className = "flex items-center gap-2" >
816860 { StatusBadge }
817861 { efficiencyPercent && (
818- < Badge variant = "outline" className = "text-xs" >
819- { efficiencyPercent } % eff
862+ < Badge
863+ variant = "outline"
864+ className = "text-xs"
865+ title = { efficiencyData ?. isEstimated
866+ ? `Estimated efficiency based on typical ${ state . info ?. ASICModel } specs`
867+ : 'Efficiency based on device-reported expected hashrate' }
868+ >
869+ { efficiencyPercent } % eff{ efficiencyData ?. isEstimated && '~' }
820870 </ Badge >
821871 ) }
822872 { ( state . info ?. blockFound === 1 || blockFoundCelebration ) && (
0 commit comments