8000 Simplify share rejection explanations by GIGIG4 · Pull Request #861 · bitaxeorg/ESP-Miner · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Simplify share rejection explanations #861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component } from '@angular/core';
import { interval, map, Observable, shareReplay, startWith, switchMap, tap } from 'rxjs';
import { HashSuffixPipe } from 'src/app/pipes/hash-suffix.pipe';
import { MiningPool } from 'src/app/services/pools/mining-pool.interface';
import { PoolFactoryService } from 'src/app/services/pools/pool-factory.service';
import { QuicklinkService } from 'src/app/services/quicklink.service';
import { ShareRejectionExplanationService } from 'src/app/services/share-rejection-explanation.service';
import { SystemService } from 'src/app/services/system.service';
import { ThemeService } from 'src/app/services/theme.service';
import { ISystemInfo } from 'src/models/ISystemInfo';
Expand Down Expand Up @@ -30,7 +30,6 @@ export class HomeComponent {
public maxTemp: number = 75;
public maxFrequency: number = 800;

public pool!: MiningPool;
public quickLink$!: Observable<string | undefined>;

public activePoolURL!: string;
Expand All @@ -41,7 +40,8 @@ export class HomeComponent {
constructor(
private systemService: SystemService,
private themeService: ThemeService,
private poolFactory: PoolFactoryService
private quickLinkService: QuicklinkService,
private shareRejectReasonsService: ShareRejectionExplanationService
) {
this.initializeChart();

Expand Down Expand Up @@ -230,8 +230,6 @@ export class HomeComponent {
this.activePoolURL = isFallback ? info.fallbackStratumURL : info.stratumURL;
this.activePoolUser = isFallback ? info.fallbackStratumUser : info.stratumUser;
this.activePoolPort = isFallback ? info.fallbackStratumPort : info.stratumPort;

this.pool = this.poolFactory.getPoolForUrl(this.activePoolURL);
}),
map(info => {
info.power = parseFloat(info.power.toFixed(1))
Expand All @@ -254,14 +252,13 @@ export class HomeComponent {
map(info => {
const url = info.isUsingFallbackStratum ? info.fallbackStratumURL : info.stratumURL;
const user = info.isUsingFallbackStratum ? info.fallbackStratumUser : info.stratumUser;
const pool = this.poolFactory.getPoolForUrl(url);
return pool.getQuickLink(url, user);
return this.quickLinkService.getQuickLink(url, user);
})
);
}

getRejectionExplanation(reason: string): string | null {
return this.pool?.getRejectionExplanation(reason) ?? null;
return this.shareRejectReasonsService.getExplanation(reason);
}

getSortedRejectedReasons(info: ISystemInfo): ISystemInfo['sharesRejectedReasons'] {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading
0