Fix linting

This commit is contained in:
softsimon 2023-05-12 09:37:19 -05:00
parent f6caed3ffd
commit 5a0c809fa7
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -22,7 +22,7 @@ export class GlobalFooterComponent implements OnInit {
urlLanguage: string; urlLanguage: string;
network$: Observable<string>; network$: Observable<string>;
networkPaths: { [network: string]: string }; networkPaths: { [network: string]: string };
currentNetwork = ""; currentNetwork = '';
constructor( constructor(
public stateService: StateService, public stateService: StateService,
@ -45,19 +45,23 @@ export class GlobalFooterComponent implements OnInit {
this.network$.pipe(takeUntil(this.destroy$)).subscribe((network) => { this.network$.pipe(takeUntil(this.destroy$)).subscribe((network) => {
this.currentNetwork = network; this.currentNetwork = network;
}); });
console.log(this.networkPaths); }
ngOnDestroy(): void {
this.destroy$.next(true);
this.destroy$.complete();
} }
networkLink(network) { networkLink(network) {
let thisNetwork = network || "mainnet"; const thisNetwork = network || 'mainnet';
if( network === "" || network === "mainnet" || network === "testnet" || network === "signet" ) { if( network === '' || network === 'mainnet' || network === 'testnet' || network === 'signet' ) {
return ( this.env.BASE_MODULE === 'mempool' ? "" : this.env.MEMPOOL_WEBSITE_URL + this.urlLanguage ) + this.networkPaths[thisNetwork] || '/'; return (this.env.BASE_MODULE === 'mempool' ? '' : this.env.MEMPOOL_WEBSITE_URL + this.urlLanguage) + this.networkPaths[thisNetwork] || '/';
} }
if( network === "liquid" || network === "liquidtestnet" ) { if( network === 'liquid' || network === 'liquidtestnet' ) {
return ( this.env.BASE_MODULE === 'liquid' ? "" : this.env.LIQUID_WEBSITE_URL + this.urlLanguage ) + this.networkPaths[thisNetwork] || '/'; return (this.env.BASE_MODULE === 'liquid' ? '' : this.env.LIQUID_WEBSITE_URL + this.urlLanguage) + this.networkPaths[thisNetwork] || '/';
} }
if( network === "bisq" ) { if( network === 'bisq' ) {
return ( this.env.BASE_MODULE === 'bisq' ? "" : this.env.BISQ_WEBSITE_URL + this.urlLanguage ) + this.networkPaths[thisNetwork] || '/'; return (this.env.BASE_MODULE === 'bisq' ? '' : this.env.BISQ_WEBSITE_URL + this.urlLanguage) + this.networkPaths[thisNetwork] || '/';
} }
} }