| 
									
										
										
										
											2020-09-21 19:41:12 +07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-26 23:40:26 +07:00
										 |  |  | <div class="container-xl mt-2"> | 
					
						
							| 
									
										
										
										
											2020-09-21 19:41:12 +07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-22 12:50:12 +07:00
										 |  |  |   <div class="row row-cols-1 row-cols-md-2" *ngIf="{ value: (mempoolInfoData$ | async) } as mempoolInfoData"> | 
					
						
							| 
									
										
										
										
											2020-09-21 19:41:12 +07:00
										 |  |  |     <div class="col mb-4"> | 
					
						
							|  |  |  |       <div class="card text-center"> | 
					
						
							|  |  |  |         <div class="card-body"> | 
					
						
							| 
									
										
										
										
											2020-09-27 00:39:29 +07:00
										 |  |  |           <app-fees-box *ngIf="(network$ | async) === ''" class="d-block"></app-fees-box> | 
					
						
							| 
									
										
										
										
											2020-09-21 19:41:12 +07:00
										 |  |  |         </div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2020-09-26 02:11:30 +07:00
										 |  |  |     <div class="col mb-4" *ngIf="(network$ | async) !== 'liquid'; else emptyBlock"> | 
					
						
							| 
									
										
										
										
											2020-09-21 19:41:12 +07:00
										 |  |  |       <div class="card text-center"> | 
					
						
							| 
									
										
										
										
											2020-09-26 22:46:26 +07:00
										 |  |  |         <div class="card-body more-padding"> | 
					
						
							| 
									
										
										
										
											2020-09-26 03:50:32 +07:00
										 |  |  |           <h5 class="card-title">Difficulty adjustment</h5> | 
					
						
							|  |  |  |           <div class="progress" *ngIf="(difficultyEpoch$ | async) as epochData; else loading"> | 
					
						
							| 
									
										
										
										
											2020-09-22 12:07:08 +07:00
										 |  |  |             <div class="progress-bar" role="progressbar" style="width: 15%; background-color: #105fb0" [ngStyle]="{'width': epochData.base}"><ng-template [ngIf]="epochData.change > 0">+</ng-template>{{ epochData.change | number: '1.0-2' }}%</div> | 
					
						
							| 
									
										
										
										
											2020-09-21 19:41:12 +07:00
										 |  |  |             <div class="progress-bar bg-success" role="progressbar" style="width: 0%" [ngStyle]="{'width': epochData.green}"></div> | 
					
						
							|  |  |  |             <div class="progress-bar bg-danger" role="progressbar" style="width: 1%; background-color: #f14d80;" [ngStyle]="{'width': epochData.red}"></div> | 
					
						
							|  |  |  |           </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2020-09-26 22:46:26 +07:00
										 |  |  |     <div class="col mb-4"> | 
					
						
							|  |  |  |       <div class="card text-center"> | 
					
						
							| 
									
										
										
										
											2020-09-26 23:40:26 +07:00
										 |  |  |         <div class="card-body pl-0"> | 
					
						
							| 
									
										
										
										
											2020-09-27 01:31:20 +07:00
										 |  |  |           <div style="padding-left: 1.25rem;"> | 
					
						
							|  |  |  |             <table style="width: 100%;"> | 
					
						
							|  |  |  |               <tr> | 
					
						
							|  |  |  |                 <td> | 
					
						
							|  |  |  |                   <h5 class="card-title">Mempool size</h5> | 
					
						
							|  |  |  |                   <p class="card-text" *ngIf="(mempoolBlocksData$ | async) as mempoolBlocksData; else loading"> | 
					
						
							|  |  |  |                     {{ mempoolBlocksData.size | bytes }} ({{ mempoolBlocksData.blocks }} block<span [hidden]="mempoolBlocksData.blocks <= 1">s</span>) | 
					
						
							|  |  |  |                   </p> | 
					
						
							|  |  |  |                 </td> | 
					
						
							|  |  |  |                 <td> | 
					
						
							|  |  |  |                   <h5 class="card-title">Unconfirmed</h5> | 
					
						
							|  |  |  |                   <p class="card-text" *ngIf="mempoolInfoData.value; else loading"> | 
					
						
							|  |  |  |                     {{ mempoolInfoData.value.memPoolInfo.size | number }} | 
					
						
							|  |  |  |                   </p> | 
					
						
							|  |  |  |                 </td> | 
					
						
							|  |  |  |               </tr> | 
					
						
							|  |  |  |             </table> | 
					
						
							| 
									
										
										
										
											2020-09-27 02:24:50 +07:00
										 |  |  |             <hr> | 
					
						
							| 
									
										
										
										
											2020-09-27 01:31:20 +07:00
										 |  |  |           </div> | 
					
						
							| 
									
										
										
										
											2020-09-26 22:46:26 +07:00
										 |  |  |           <div style="height: 250px;" *ngIf="(mempoolStats$ | async) as mempoolStats"> | 
					
						
							|  |  |  |             <app-mempool-graph [data]="mempoolStats.mempool" [showLegend]="false" [offsetX]="10"></app-mempool-graph> | 
					
						
							|  |  |  |           </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |     <div class="col mb-4"> | 
					
						
							|  |  |  |       <div class="card text-center"> | 
					
						
							| 
									
										
										
										
											2020-09-27 01:31:20 +07:00
										 |  |  |         <div class="card-body more-padding"> | 
					
						
							| 
									
										
										
										
											2020-09-27 00:39:29 +07:00
										 |  |  |           <h5 class="card-title">Tx weight per second</h5> | 
					
						
							| 
									
										
										
										
											2020-09-27 01:31:20 +07:00
										 |  |  |             <ng-template [ngIf]="mempoolInfoData.value" [ngIfElse]="loading"> | 
					
						
							|  |  |  |               <span *ngIf="mempoolInfoData.value.vBytesPerSecond === 0; else inSync"> | 
					
						
							|  |  |  |                  <span class="badge badge-pill badge-warning">Backend is synchronizing</span> | 
					
						
							|  |  |  |               </span> | 
					
						
							|  |  |  |               <ng-template #inSync> | 
					
						
							| 
									
										
										
										
											2020-09-27 02:24:50 +07:00
										 |  |  |                 <div class="progress sub-text" style="max-width: 250px;"> | 
					
						
							| 
									
										
										
										
											2020-09-27 01:31:20 +07:00
										 |  |  |                   <div class="progress-bar {{ mempoolInfoData.value.progressClass }}" style="padding: 4px;" role="progressbar" [ngStyle]="{'width': mempoolInfoData.value.progressWidth}">{{ mempoolInfoData.value.vBytesPerSecond | ceil | number }} vB/s</div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |               </ng-template> | 
					
						
							|  |  |  |             </ng-template> | 
					
						
							| 
									
										
										
										
											2020-09-27 02:24:50 +07:00
										 |  |  |             <br> | 
					
						
							|  |  |  |             <hr> | 
					
						
							| 
									
										
										
										
											2020-09-27 01:31:20 +07:00
										 |  |  |             <div style="height: 250px;" *ngIf="(mempoolStats$ | async) as mempoolStats"> | 
					
						
							|  |  |  |               <app-chartist | 
					
						
							|  |  |  |                   [data]="mempoolStats.weightPerSecond" | 
					
						
							|  |  |  |                   [type]="'Line'" | 
					
						
							|  |  |  |                   [options]="transactionsWeightPerSecondOptions"> | 
					
						
							|  |  |  |                 </app-chartist> | 
					
						
							|  |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2020-09-26 22:46:26 +07:00
										 |  |  |         </div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2020-09-26 02:42:39 +07:00
										 |  |  |     <div class="col mb-4"> | 
					
						
							|  |  |  |       <div class="card text-center"> | 
					
						
							|  |  |  |         <div class="card-body"> | 
					
						
							| 
									
										
										
										
											2020-09-26 03:50:32 +07:00
										 |  |  |           <h5 class="card-title">Latest blocks</h5> | 
					
						
							| 
									
										
										
										
											2020-09-26 02:11:30 +07:00
										 |  |  |           <table class="table table-borderless text-left"> | 
					
						
							|  |  |  |             <thead> | 
					
						
							|  |  |  |               <th style="width: 15%;">Height</th> | 
					
						
							| 
									
										
										
										
											2020-09-26 11:56:37 +07:00
										 |  |  |               <th style="width: 35%;">Mined</th> | 
					
						
							| 
									
										
										
										
											2020-09-26 22:46:26 +07:00
										 |  |  |               <th style="width: 20%;" class="d-none d-lg-table-cell">Txs</th> | 
					
						
							| 
									
										
										
										
											2020-09-26 02:11:30 +07:00
										 |  |  |               <th style="width: 30%;">Filled</th> | 
					
						
							|  |  |  |             </thead> | 
					
						
							|  |  |  |             <tbody> | 
					
						
							|  |  |  |               <tr *ngFor="let block of blocks$ | async; let i = index; trackBy: trackByBlock"> | 
					
						
							|  |  |  |                 <td><a [routerLink]="['/block' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a></td> | 
					
						
							|  |  |  |                 <td><app-time-since [time]="block.timestamp" [fastRender]="true"></app-time-since> ago</td> | 
					
						
							| 
									
										
										
										
											2020-09-26 22:46:26 +07:00
										 |  |  |                 <td class="d-none d-lg-table-cell">{{ block.tx_count | number }}</td> | 
					
						
							| 
									
										
										
										
											2020-09-26 02:11:30 +07:00
										 |  |  |                 <td> | 
					
						
							|  |  |  |                   <div class="progress position-relative"> | 
					
						
							|  |  |  |                     <div class="progress-bar progress-mempool {{ network$ | async }}" role="progressbar" [ngStyle]="{'width': (block.weight / 4000000)*100 + '%' }"></div> | 
					
						
							|  |  |  |                     <div class="progress-text">{{ block.size | bytes: 2 }}</div> | 
					
						
							|  |  |  |                   </div> | 
					
						
							|  |  |  |                 </td> | 
					
						
							|  |  |  |               </tr> | 
					
						
							|  |  |  |             </tbody> | 
					
						
							|  |  |  |           </table> | 
					
						
							|  |  |  |           <div class="text-center"><a href="" [routerLink]="['/blocks' | relativeUrl]">View all »</a></div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2020-09-26 03:50:32 +07:00
										 |  |  |     <div class="col mb-4"> | 
					
						
							|  |  |  |       <div class="card text-center"> | 
					
						
							|  |  |  |         <div class="card-body"> | 
					
						
							|  |  |  |           <h5 class="card-title">Latest transactions</h5> | 
					
						
							|  |  |  |           <table class="table table-borderless text-left"> | 
					
						
							|  |  |  |             <thead> | 
					
						
							|  |  |  |               <th style="width: 25%;">TXID</th> | 
					
						
							| 
									
										
										
										
											2020-09-26 22:46:26 +07:00
										 |  |  |               <th style="width: 50%;" class="text-right d-none d-lg-table-cell">Amount (BTC)</th> | 
					
						
							| 
									
										
										
										
											2020-09-26 03:50:32 +07:00
										 |  |  |               <th style="width: 25%;" class="text-right">Fee</th> | 
					
						
							|  |  |  |             </thead> | 
					
						
							|  |  |  |             <tbody> | 
					
						
							|  |  |  |               <tr *ngFor="let transaction of transactions$ | async; let i = index;"> | 
					
						
							|  |  |  |                 <td><a [routerLink]="['/tx' | relativeUrl, transaction.txid]">{{ transaction.txid | shortenString : 12 }}</a></td> | 
					
						
							| 
									
										
										
										
											2020-09-26 22:46:26 +07:00
										 |  |  |                 <td class="text-right d-none d-lg-table-cell"><app-amount [satoshis]="transaction.value" digitsInfo="1.2-2" [noFiat]="true"></app-amount> (<app-fiat [value]="transaction.value" digitsInfo="1.0-0"></app-fiat>)</td> | 
					
						
							| 
									
										
										
										
											2020-09-26 03:50:32 +07:00
										 |  |  |                 <td class="text-right">{{ transaction.fee / (transaction.weight / 4) | number : '1.1-1' }} sat/vB</td> | 
					
						
							|  |  |  |               </tr> | 
					
						
							|  |  |  |             </tbody> | 
					
						
							|  |  |  |           </table> | 
					
						
							|  |  |  |           <div class="text-center"> </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2020-09-21 19:41:12 +07:00
										 |  |  |   </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-22 12:50:12 +07:00
										 |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <ng-template #loading> | 
					
						
							|  |  |  |   <div class="skeleton-loader"></div> | 
					
						
							| 
									
										
										
										
											2020-09-26 02:11:30 +07:00
										 |  |  | </ng-template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <ng-template #emptyBlock> | 
					
						
							|  |  |  |   <div class="col mb-4"> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   </div> | 
					
						
							| 
									
										
										
										
											2020-09-22 12:50:12 +07:00
										 |  |  | </ng-template> |