Remove all lightning elements on unsupported networks
This commit is contained in:
@@ -115,6 +115,7 @@ export class StateService {
|
||||
isMempoolSpaceBuild = window['isMempoolSpaceBuild'] ?? false;
|
||||
backend: 'esplora' | 'electrum' | 'none' = 'esplora';
|
||||
network = '';
|
||||
lightningNetworks = ['', 'mainnet', 'bitcoin', 'testnet', 'signet'];
|
||||
lightning = false;
|
||||
blockVSize: number;
|
||||
env: Env;
|
||||
@@ -370,6 +371,10 @@ export class StateService {
|
||||
this.lightningChanged$.next(this.lightning);
|
||||
}
|
||||
|
||||
networkSupportsLightning() {
|
||||
return this.env.LIGHTNING && this.lightningNetworks.includes(this.network);
|
||||
}
|
||||
|
||||
getHiddenProp(){
|
||||
const prefixes = ['webkit', 'moz', 'ms', 'o'];
|
||||
if ('hidden' in document) { return 'hidden'; }
|
||||
|
||||
Reference in New Issue
Block a user