[accelerator] clear state after loading preview

This commit is contained in:
nymkappa
2024-04-06 12:27:43 +09:00
parent c45111333d
commit 854222b8cc
3 changed files with 15 additions and 6 deletions

View File

@@ -86,6 +86,7 @@ const defaultEnv: Env = {
providedIn: 'root'
})
export class StateService {
ref: string = '';
isBrowser: boolean = isPlatformBrowser(this.platformId);
isMempoolSpaceBuild = window['isMempoolSpaceBuild'] ?? false;
backend: 'esplora' | 'electrum' | 'none' = 'esplora';
@@ -162,6 +163,8 @@ export class StateService {
private router: Router,
private storageService: StorageService,
) {
this.ref = window.document.referrer;
const browserWindow = window || {};
// @ts-ignore
const browserWindowEnv = browserWindow.__env || {};