Hide accelerator charts on non-mainnet

fixes #5265
This commit is contained in:
softsimon 2024-07-04 11:43:31 +09:00
parent 46c4d57367
commit 3c6e18f198
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
3 changed files with 6 additions and 1 deletions

View File

@ -45,7 +45,7 @@
</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>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<a class="dropdown-item" routerLinkActive="active" [routerLink]="['/graphs/acceleration/fees' | relativeUrl]"

View File

@ -9,6 +9,7 @@ import { WebsocketService } from '../../services/websocket.service';
})
export class GraphsComponent implements OnInit {
flexWrap = false;
isMainnet = this.stateService.isMainnet();
constructor(
public stateService: StateService,

View File

@ -410,6 +410,10 @@ export class StateService {
return this.network === 'liquid' || this.network === 'liquidtestnet';
}
isMainnet(): boolean {
return this.env.ROOT_NETWORK === '' && this.network === '';
}
isAnyTestnet(): boolean {
return ['testnet', 'testnet4', 'signet', 'liquidtestnet'].includes(this.network);
}