Projected
diff --git a/frontend/src/app/components/block/block.component.ts b/frontend/src/app/components/block/block.component.ts
index 916904375..3523f9a06 100644
--- a/frontend/src/app/components/block/block.component.ts
+++ b/frontend/src/app/components/block/block.component.ts
@@ -58,6 +58,7 @@ export class BlockComponent implements OnInit, OnDestroy {
webGlEnabled = true;
indexingAvailable = false;
auditEnabled = true;
+ auditDataMissing: boolean;
isMobile = window.innerWidth <= 767.98;
hoverTx: string;
numMissing: number = 0;
@@ -137,6 +138,7 @@ export class BlockComponent implements OnInit, OnDestroy {
this.error = undefined;
this.fees = undefined;
this.stateService.markBlock$.next({});
+ this.auditDataMissing = false;
if (history.state.data && history.state.data.blockHeight) {
this.blockHeight = history.state.data.blockHeight;
@@ -152,6 +154,9 @@ export class BlockComponent implements OnInit, OnDestroy {
if (history.state.data && history.state.data.block) {
this.blockHeight = history.state.data.block.height;
+ if (this.blockHeight < this.stateService.env.BLOCK_AUDIT_START_HEIGHT) {
+ this.auditDataMissing = true;
+ }
return of(history.state.data.block);
} else {
this.isLoadingBlock = true;
@@ -213,7 +218,9 @@ export class BlockComponent implements OnInit, OnDestroy {
this.apiService.getBlockAudit$(block.previousblockhash);
}, 100);
}
-
+ if (block.height < this.stateService.env.BLOCK_AUDIT_START_HEIGHT) {
+ this.auditDataMissing = true;
+ }
this.block = block;
this.blockHeight = block.height;
this.lastBlockHeight = this.blockHeight;
@@ -363,6 +370,7 @@ export class BlockComponent implements OnInit, OnDestroy {
this.auditEnabled = true;
} else {
this.auditEnabled = false;
+ this.auditDataMissing = true;
}
return blockAudit;
}),
diff --git a/frontend/src/app/services/state.service.ts b/frontend/src/app/services/state.service.ts
index 7f133c8a0..eff2f2c1d 100644
--- a/frontend/src/app/services/state.service.ts
+++ b/frontend/src/app/services/state.service.ts
@@ -39,6 +39,7 @@ export interface Env {
BISQ_WEBSITE_URL: string;
MINING_DASHBOARD: boolean;
LIGHTNING: boolean;
+ BLOCK_AUDIT_START_HEIGHT: number;
}
const defaultEnv: Env = {
@@ -64,6 +65,7 @@ const defaultEnv: Env = {
'BISQ_WEBSITE_URL': 'https://bisq.markets',
'MINING_DASHBOARD': true,
'LIGHTNING': false,
+ 'BLOCK_AUDIT_START_HEIGHT': 0,
};
@Injectable({
diff --git a/frontend/src/app/shared/graphs.utils.ts b/frontend/src/app/shared/graphs.utils.ts
index 37f2d3250..0edcfda91 100644
--- a/frontend/src/app/shared/graphs.utils.ts
+++ b/frontend/src/app/shared/graphs.utils.ts
@@ -85,10 +85,10 @@ export const download = (href, name) => {
document.body.removeChild(a);
};
-export function detectWebGL() {
+export function detectWebGL(): boolean {
const canvas = document.createElement('canvas');
const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
- return (gl && gl instanceof WebGLRenderingContext);
+ return !!(gl && gl instanceof WebGLRenderingContext);
}
/**