;
+ network = environment.network;
@Input() satoshis: number;
diff --git a/frontend/src/app/components/block/block.component.ts b/frontend/src/app/components/block/block.component.ts
index 7eb89a612..df529724b 100644
--- a/frontend/src/app/components/block/block.component.ts
+++ b/frontend/src/app/components/block/block.component.ts
@@ -77,7 +77,7 @@ export class BlockComponent implements OnInit, OnDestroy {
),
)
.subscribe((transactions: Transaction[]) => {
- if (this.fees === undefined) {
+ if (this.fees === undefined && transactions[0]) {
this.fees = transactions[0].vout.reduce((acc: number, curr: Vout) => acc + curr.value, 0) / 100000000 - this.blockSubsidy;
}
this.transactions = transactions;
diff --git a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.html b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.html
index 5a96daf4a..906f15140 100644
--- a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.html
+++ b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.html
@@ -9,7 +9,14 @@
{{ projectedBlock.blockSize | bytes: 2 }}
{{ projectedBlock.nTx }} transactions
- In ~{{ 10 * i + 10 }} minutes
+
+
+ In < {{ 1 * i + 1 }} minute
+
+
+ In ~{{ 10 * i + 10 }} minutes
+
+
= 1000000">
+{{ projectedBlock.blockVSize / 1000000 | ceil }} blocks
diff --git a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts
index 8fa6ceb75..d1fe7f845 100644
--- a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts
+++ b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts
@@ -4,7 +4,7 @@ import { MempoolBlock } from 'src/app/interfaces/websocket.interface';
import { StateService } from 'src/app/services/state.service';
import { Router } from '@angular/router';
import { take } from 'rxjs/operators';
-
+import { environment } from '../../../environments/environment';
@Component({
selector: 'app-mempool-blocks',
templateUrl: './mempool-blocks.component.html',
@@ -14,6 +14,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
mempoolBlocks: MempoolBlock[];
mempoolBlocksFull: MempoolBlock[];
mempoolBlocksSubscription: Subscription;
+ network = environment.network;
blockWidth = 125;
blockPadding = 30;
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 3a0e45229..f135e441a 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -102,7 +102,12 @@
- ~{{ 10 * txInBlockIndex + 10 }} minutes ({{ txInBlockIndex + 1 }} block{{ txInBlockIndex > 0 ? 's' : '' }})
+
+ < {{ 1 * txInBlockIndex + 1 }} minutes ({{ txInBlockIndex + 1 }} block{{ txInBlockIndex > 0 ? 's' : '' }})
+
+
+ ~{{ 10 * txInBlockIndex + 10 }} minutes ({{ txInBlockIndex + 1 }} block{{ txInBlockIndex > 0 ? 's' : '' }})
+
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts
index 49358fdb3..112c95e5c 100644
--- a/frontend/src/app/components/transaction/transaction.component.ts
+++ b/frontend/src/app/components/transaction/transaction.component.ts
@@ -9,6 +9,7 @@ import { WebsocketService } from '../../services/websocket.service';
import { AudioService } from 'src/app/services/audio.service';
import { ApiService } from 'src/app/services/api.service';
import { SeoService } from 'src/app/services/seo.service';
+import { environment } from '../../../environments/environment';
@Component({
selector: 'app-transaction',
@@ -16,6 +17,7 @@ import { SeoService } from 'src/app/services/seo.service';
styleUrls: ['./transaction.component.scss']
})
export class TransactionComponent implements OnInit, OnDestroy {
+ network = environment.network;
tx: Transaction;
txId: string;
feeRating: number;
diff --git a/frontend/src/environments/environment.prod.ts b/frontend/src/environments/environment.prod.ts
index 3612073bc..397bcb4c1 100644
--- a/frontend/src/environments/environment.prod.ts
+++ b/frontend/src/environments/environment.prod.ts
@@ -1,3 +1,8 @@
+const full = window.location.host;
+const parts = full.split('.');
+const sub = parts[0];
+
export const environment = {
- production: true
+ production: true,
+ network: sub,
};