mirror of
https://github.com/benjamin-wilson/public-pool-ui.git
synced 2025-07-11 23:53:32 +02:00
add stratum rul to environment
This commit is contained in:
@ -7,6 +7,8 @@ import { HashSuffixPipe } from '../../pipes/hash-suffix.pipe';
|
|||||||
import { AppService } from '../../services/app.service';
|
import { AppService } from '../../services/app.service';
|
||||||
import { ClientService } from '../../services/client.service';
|
import { ClientService } from '../../services/client.service';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dashboard',
|
selector: 'app-dashboard',
|
||||||
templateUrl: './dashboard.component.html',
|
templateUrl: './dashboard.component.html',
|
||||||
@ -28,6 +30,7 @@ export class DashboardComponent implements AfterViewInit {
|
|||||||
public expandedRows$: Observable<any>;
|
public expandedRows$: Observable<any>;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private clientService: ClientService,
|
private clientService: ClientService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div class="info mb-2 p-4 border-dashed border-1 border-round">
|
<div class="info mb-2 p-4 border-dashed border-1 border-round">
|
||||||
<code>stratum+tcp://public-pool.io:21496</code>
|
<code>stratum+tcp://{{stratumURL}}</code>
|
||||||
<br>
|
<br>
|
||||||
<code>username: <your BTC address>.<worker name>, password: x</code>
|
<code>username: <your BTC address>.<worker name>, password: x</code>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,6 +2,7 @@ import { Component } from '@angular/core';
|
|||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { map, Observable, shareReplay } from 'rxjs';
|
import { map, Observable, shareReplay } from 'rxjs';
|
||||||
|
|
||||||
|
import { environment } from '../../../environments/environment';
|
||||||
import { HashSuffixPipe } from '../../pipes/hash-suffix.pipe';
|
import { HashSuffixPipe } from '../../pipes/hash-suffix.pipe';
|
||||||
import { AppService } from '../../services/app.service';
|
import { AppService } from '../../services/app.service';
|
||||||
import { bitcoinAddressValidator } from '../../validators/bitcoin-address.validator';
|
import { bitcoinAddressValidator } from '../../validators/bitcoin-address.validator';
|
||||||
@ -22,14 +23,18 @@ export class SplashComponent {
|
|||||||
|
|
||||||
public chartOptions: any;
|
public chartOptions: any;
|
||||||
|
|
||||||
|
public stratumURL = '';
|
||||||
|
|
||||||
constructor(private appService: AppService) {
|
constructor(private appService: AppService) {
|
||||||
|
|
||||||
const info$ = this.appService.getInfo().pipe(shareReplay({ refCount: true, bufferSize: 1 }));
|
const info$ = this.appService.getInfo().pipe(shareReplay({ refCount: true, bufferSize: 1 }));
|
||||||
|
|
||||||
|
|
||||||
|
if (environment.STRATUM_URL.length > 1) {
|
||||||
|
this.stratumURL = environment.STRATUM_URL;
|
||||||
|
} else {
|
||||||
|
this.stratumURL = window.location.hostname + ':3333';
|
||||||
|
}
|
||||||
|
|
||||||
this.blockData$ = info$.pipe(map(info => info.blockData));
|
this.blockData$ = info$.pipe(map(info => info.blockData));
|
||||||
this.userAgents$ = info$.pipe(map(info => info.userAgents));
|
this.userAgents$ = info$.pipe(map(info => info.userAgents));
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
API_URL: 'https://public-pool.io:40557',
|
API_URL: 'https://public-pool.io:40557',
|
||||||
|
STRATUM_URL: 'public-pool.io:21496'
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
API_URL: 'http://localhost:3334'
|
API_URL: 'http://localhost:3334',
|
||||||
|
STRATUM_URL: 'public-pool.io:21496'
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user