Merge pull request #5273 from mempool/simon/hide-accelerator-graphs-non-mainnet
Hide accelerator charts on non-mainnet
This commit is contained in:
commit
fb44c1d8a8
@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ngbDropdown class="w-33" *ngIf="stateService.env.ACCELERATOR">
|
<div ngbDropdown class="w-33" *ngIf="stateService.env.ACCELERATOR && isMainnet">
|
||||||
<button class="btn btn-primary w-100" id="dropdownBasic1" ngbDropdownToggle i18n="accelerator.accelerations">Accelerations</button>
|
<button class="btn btn-primary w-100" id="dropdownBasic1" ngbDropdownToggle i18n="accelerator.accelerations">Accelerations</button>
|
||||||
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
|
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
|
||||||
<a class="dropdown-item" routerLinkActive="active" [routerLink]="['/graphs/acceleration/fees' | relativeUrl]"
|
<a class="dropdown-item" routerLinkActive="active" [routerLink]="['/graphs/acceleration/fees' | relativeUrl]"
|
||||||
|
@ -9,6 +9,7 @@ import { WebsocketService } from '../../services/websocket.service';
|
|||||||
})
|
})
|
||||||
export class GraphsComponent implements OnInit {
|
export class GraphsComponent implements OnInit {
|
||||||
flexWrap = false;
|
flexWrap = false;
|
||||||
|
isMainnet = this.stateService.isMainnet();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public stateService: StateService,
|
public stateService: StateService,
|
||||||
|
@ -410,6 +410,10 @@ export class StateService {
|
|||||||
return this.network === 'liquid' || this.network === 'liquidtestnet';
|
return this.network === 'liquid' || this.network === 'liquidtestnet';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isMainnet(): boolean {
|
||||||
|
return this.env.ROOT_NETWORK === '' && this.network === '';
|
||||||
|
}
|
||||||
|
|
||||||
isAnyTestnet(): boolean {
|
isAnyTestnet(): boolean {
|
||||||
return ['testnet', 'testnet4', 'signet', 'liquidtestnet'].includes(this.network);
|
return ['testnet', 'testnet4', 'signet', 'liquidtestnet'].includes(this.network);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user