mirror of
https://github.com/benjamin-wilson/public-pool-ui.git
synced 2025-03-17 21:32:54 +01:00
add stratum rul to environment
This commit is contained in:
parent
463fc9b676
commit
4f9e150252
src
app/components
environments
@ -7,6 +7,8 @@ import { HashSuffixPipe } from '../../pipes/hash-suffix.pipe';
|
||||
import { AppService } from '../../services/app.service';
|
||||
import { ClientService } from '../../services/client.service';
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html',
|
||||
@ -28,6 +30,7 @@ export class DashboardComponent implements AfterViewInit {
|
||||
public expandedRows$: Observable<any>;
|
||||
|
||||
|
||||
|
||||
constructor(
|
||||
private clientService: ClientService,
|
||||
private route: ActivatedRoute,
|
||||
|
@ -31,7 +31,7 @@
|
||||
<br>
|
||||
<br>
|
||||
<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>
|
||||
<code>username: <your BTC address>.<worker name>, password: x</code>
|
||||
</div>
|
||||
|
@ -2,6 +2,7 @@ import { Component } from '@angular/core';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { map, Observable, shareReplay } from 'rxjs';
|
||||
|
||||
import { environment } from '../../../environments/environment';
|
||||
import { HashSuffixPipe } from '../../pipes/hash-suffix.pipe';
|
||||
import { AppService } from '../../services/app.service';
|
||||
import { bitcoinAddressValidator } from '../../validators/bitcoin-address.validator';
|
||||
@ -22,14 +23,18 @@ export class SplashComponent {
|
||||
|
||||
public chartOptions: any;
|
||||
|
||||
|
||||
public stratumURL = '';
|
||||
|
||||
constructor(private appService: AppService) {
|
||||
|
||||
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.userAgents$ = info$.pipe(map(info => info.userAgents));
|
||||
|
@ -1,4 +1,5 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
API_URL: 'https://public-pool.io:40557',
|
||||
STRATUM_URL: 'public-pool.io:21496'
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
API_URL: 'http://localhost:3334'
|
||||
API_URL: 'http://localhost:3334',
|
||||
STRATUM_URL: 'public-pool.io:21496'
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user