[block list] improve block list when db = false
This commit is contained in:
		
							parent
							
								
									a24d2ce547
								
							
						
					
					
						commit
						d7ac326f92
					
				@ -1,6 +1,6 @@
 | 
				
			|||||||
<app-indexing-progress *ngIf="!widget"></app-indexing-progress>
 | 
					<app-indexing-progress *ngIf="!widget"></app-indexing-progress>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="container-xl" style="min-height: 335px" [ngClass]="{'widget': widget, 'full-height': !widget, 'legacy': !indexingAvailable}">
 | 
					<div class="container-xl" style="min-height: 335px" [ngClass]="{'widget': widget, 'full-height': !widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
  <h1 *ngIf="!widget" class="float-left" i18n="master-page.blocks">Blocks</h1>
 | 
					  <h1 *ngIf="!widget" class="float-left" i18n="master-page.blocks">Blocks</h1>
 | 
				
			||||||
  <div *ngIf="!widget && isLoading" class="spinner-border ml-3" role="status"></div>
 | 
					  <div *ngIf="!widget && isLoading" class="spinner-border ml-3" role="status"></div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -9,28 +9,28 @@
 | 
				
			|||||||
  <div style="min-height: 295px">
 | 
					  <div style="min-height: 295px">
 | 
				
			||||||
    <table class="table table-borderless">
 | 
					    <table class="table table-borderless">
 | 
				
			||||||
      <thead>
 | 
					      <thead>
 | 
				
			||||||
        <th class="height text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}" i18n="latest-blocks.height">Height</th>
 | 
					        <th class="height text-left" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}" i18n="latest-blocks.height">Height</th>
 | 
				
			||||||
        <th *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}" i18n="mining.pool-name"
 | 
					        <th *ngIf="isMempoolModule" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}" i18n="mining.pool-name"
 | 
				
			||||||
          i18n-ngbTooltip="mining.pool-name" ngbTooltip="Pool" placement="bottom" #miningpool [disableTooltip]="!isEllipsisActive(miningpool)">Pool</th>
 | 
					          i18n-ngbTooltip="mining.pool-name" ngbTooltip="Pool" placement="bottom" #miningpool [disableTooltip]="!isEllipsisActive(miningpool)">Pool</th>
 | 
				
			||||||
        <th class="timestamp" i18n="latest-blocks.timestamp" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">Timestamp</th>
 | 
					        <th class="timestamp" i18n="latest-blocks.timestamp" *ngIf="!widget" [class]="isMempoolModule ? '' : 'legacy'">Timestamp</th>
 | 
				
			||||||
        <th *ngIf="auditAvailable" class="health text-right" i18n="latest-blocks.health" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"
 | 
					        <th *ngIf="auditAvailable" class="health text-right" i18n="latest-blocks.health" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}"
 | 
				
			||||||
          i18n-ngbTooltip="latest-blocks.health" ngbTooltip="Health" placement="bottom" #health [disableTooltip]="!isEllipsisActive(health)">Health</th>
 | 
					          i18n-ngbTooltip="latest-blocks.health" ngbTooltip="Health" placement="bottom" #health [disableTooltip]="!isEllipsisActive(health)">Health</th>
 | 
				
			||||||
        <th *ngIf="indexingAvailable" class="reward text-right" i18n="latest-blocks.reward" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"
 | 
					        <th *ngIf="isMempoolModule" class="reward text-right" i18n="latest-blocks.reward" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}"
 | 
				
			||||||
          i18n-ngbTooltip="latest-blocks.reward" ngbTooltip="Reward" placement="bottom" #reward [disableTooltip]="!isEllipsisActive(reward)">Reward</th>
 | 
					          i18n-ngbTooltip="latest-blocks.reward" ngbTooltip="Reward" placement="bottom" #reward [disableTooltip]="!isEllipsisActive(reward)">Reward</th>
 | 
				
			||||||
        <th *ngIf="indexingAvailable && !widget" class="fees text-right" i18n="latest-blocks.fees" [class]="indexingAvailable ? '' : 'legacy'">Fees</th>
 | 
					        <th *ngIf="isMempoolModule && !widget" class="fees text-right" i18n="latest-blocks.fees" [class]="isMempoolModule ? '' : 'legacy'">Fees</th>
 | 
				
			||||||
        <th *ngIf="auditAvailable && !widget" class="fee-delta" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"></th>
 | 
					        <th *ngIf="auditAvailable && !widget" class="fee-delta" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}"></th>
 | 
				
			||||||
        <th *ngIf="indexingAvailable" class="txs text-right" i18n="dashboard.txs" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"
 | 
					        <th *ngIf="isMempoolModule" class="txs text-right" i18n="dashboard.txs" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}"
 | 
				
			||||||
          i18n-ngbTooltip="dashboard.txs" ngbTooltip="TXs" placement="bottom" #txs [disableTooltip]="!isEllipsisActive(txs)">TXs</th>
 | 
					          i18n-ngbTooltip="dashboard.txs" ngbTooltip="TXs" placement="bottom" #txs [disableTooltip]="!isEllipsisActive(txs)">TXs</th>
 | 
				
			||||||
        <th *ngIf="!indexingAvailable" class="txs text-right" i18n="dashboard.txs" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">Transactions</th>
 | 
					        <th *ngIf="!isMempoolModule" class="txs text-right" i18n="dashboard.txs" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">Transactions</th>
 | 
				
			||||||
        <th class="size" i18n="latest-blocks.size" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">Size</th>
 | 
					        <th class="size" i18n="latest-blocks.size" *ngIf="!widget" [class]="isMempoolModule ? '' : 'legacy'">Size</th>
 | 
				
			||||||
      </thead>
 | 
					      </thead>
 | 
				
			||||||
      <tbody *ngIf="blocks$ | async as blocks; else skeleton" [style]="isLoading ? 'opacity: 0.75' : ''">
 | 
					      <tbody *ngIf="blocks$ | async as blocks; else skeleton" [style]="isLoading ? 'opacity: 0.75' : ''">
 | 
				
			||||||
        <tr *ngFor="let block of blocks; let i= index; trackBy: trackByBlock">
 | 
					        <tr *ngFor="let block of blocks; let i= index; trackBy: trackByBlock">
 | 
				
			||||||
          <td class="height text-left" [class]="widget ? 'widget' : ''">
 | 
					          <td class="height text-left" [class]="widget ? 'widget' : ''">
 | 
				
			||||||
            <a [routerLink]="['/block' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a>
 | 
					            <a [routerLink]="['/block' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a>
 | 
				
			||||||
          </td>
 | 
					          </td>
 | 
				
			||||||
          <td  *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					          <td  *ngIf="isMempoolModule" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
            <div class="tooltip-custom">
 | 
					            <div *ngIf="indexingAvailable" class="tooltip-custom">
 | 
				
			||||||
              <a class="clear-link" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.slug]">
 | 
					              <a class="clear-link" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.slug]">
 | 
				
			||||||
                <img width="22" height="22" src="{{ block.extras.pool['logo'] }}"
 | 
					                <img width="22" height="22" src="{{ block.extras.pool['logo'] }}"
 | 
				
			||||||
                  onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + block.extras.pool.name + ' mining pool'">
 | 
					                  onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + block.extras.pool.name + ' mining pool'">
 | 
				
			||||||
@ -38,11 +38,17 @@
 | 
				
			|||||||
              </a>
 | 
					              </a>
 | 
				
			||||||
              <span *ngIf="!widget" class="tooltiptext badge badge-secondary scriptmessage">{{ block.extras.coinbaseRaw | hex2ascii }}</span>
 | 
					              <span *ngIf="!widget" class="tooltiptext badge badge-secondary scriptmessage">{{ block.extras.coinbaseRaw | hex2ascii }}</span>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
 | 
					            <div *ngIf="!indexingAvailable" class="tooltip-custom">
 | 
				
			||||||
 | 
					              <img width="22" height="22" src="{{ block.extras.pool['logo'] }}"
 | 
				
			||||||
 | 
					                onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + block.extras.pool.name + ' mining pool'">
 | 
				
			||||||
 | 
					              <span class="pool-name">{{ block.extras.pool.name }}</span>
 | 
				
			||||||
 | 
					              <span *ngIf="!widget" class="tooltiptext badge badge-secondary scriptmessage">{{ block.extras.coinbaseRaw | hex2ascii }}</span>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
          </td>
 | 
					          </td>
 | 
				
			||||||
          <td class="timestamp" *ngIf="!widget" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					          <td class="timestamp" *ngIf="!widget" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
            ‎{{ block.timestamp * 1000 | date:'yyyy-MM-dd HH:mm' }}
 | 
					            ‎{{ block.timestamp * 1000 | date:'yyyy-MM-dd HH:mm' }}
 | 
				
			||||||
          </td>
 | 
					          </td>
 | 
				
			||||||
          <td *ngIf="auditAvailable" class="health text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					          <td *ngIf="auditAvailable" class="health text-right" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
            <a
 | 
					            <a
 | 
				
			||||||
              *ngIf="block?.extras?.matchRate != null; else nullHealth"
 | 
					              *ngIf="block?.extras?.matchRate != null; else nullHealth"
 | 
				
			||||||
              class="health-badge badge"
 | 
					              class="health-badge badge"
 | 
				
			||||||
@ -56,21 +62,21 @@
 | 
				
			|||||||
              <span class="health-badge badge badge-secondary" i18n="unknown">Unknown</span>
 | 
					              <span class="health-badge badge badge-secondary" i18n="unknown">Unknown</span>
 | 
				
			||||||
            </ng-template>
 | 
					            </ng-template>
 | 
				
			||||||
          </td>
 | 
					          </td>
 | 
				
			||||||
          <td *ngIf="indexingAvailable" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					          <td *ngIf="isMempoolModule" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
            <app-amount [satoshis]="block.extras.reward" [noFiat]="true" digitsInfo="1.2-2"></app-amount>
 | 
					            <app-amount [satoshis]="block.extras.reward" [noFiat]="true" digitsInfo="1.2-2"></app-amount>
 | 
				
			||||||
          </td>
 | 
					          </td>
 | 
				
			||||||
          <td *ngIf="indexingAvailable && !widget" class="fees text-right" [class]="indexingAvailable ? '' : 'legacy'">
 | 
					          <td *ngIf="isMempoolModule && !widget" class="fees text-right" [class]="isMempoolModule ? '' : 'legacy'">
 | 
				
			||||||
            <app-amount [satoshis]="block.extras.totalFees" [noFiat]="true" digitsInfo="1.2-2"></app-amount>
 | 
					            <app-amount [satoshis]="block.extras.totalFees" [noFiat]="true" digitsInfo="1.2-2"></app-amount>
 | 
				
			||||||
          </td>
 | 
					          </td>
 | 
				
			||||||
          <td *ngIf="auditAvailable" class="fee-delta" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					          <td *ngIf="auditAvailable" class="fee-delta" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
            <span *ngIf="block.extras.feeDelta" class="difference" [class.positive]="block.extras.feeDelta >= 0" [class.negative]="block.extras.feeDelta < 0">
 | 
					            <span *ngIf="block.extras.feeDelta" class="difference" [class.positive]="block.extras.feeDelta >= 0" [class.negative]="block.extras.feeDelta < 0">
 | 
				
			||||||
              {{ block.extras.feeDelta > 0 ? '+' : '' }}{{ (block.extras.feeDelta * 100) | amountShortener: 2 }}%
 | 
					              {{ block.extras.feeDelta > 0 ? '+' : '' }}{{ (block.extras.feeDelta * 100) | amountShortener: 2 }}%
 | 
				
			||||||
            </span>
 | 
					            </span>
 | 
				
			||||||
          </td>
 | 
					          </td>
 | 
				
			||||||
          <td class="txs text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					          <td class="txs text-right" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
            {{ block.tx_count | number }}
 | 
					            {{ block.tx_count | number }}
 | 
				
			||||||
          </td>
 | 
					          </td>
 | 
				
			||||||
          <td class="size" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
 | 
					          <td class="size" *ngIf="!widget" [class]="isMempoolModule ? '' : 'legacy'">
 | 
				
			||||||
            <div class="progress">
 | 
					            <div class="progress">
 | 
				
			||||||
              <div class="progress-bar progress-mempool" role="progressbar"
 | 
					              <div class="progress-bar progress-mempool" role="progressbar"
 | 
				
			||||||
                [ngStyle]="{'width': (block.weight / stateService.env.BLOCK_WEIGHT_UNITS)*100 + '%' }"></div>
 | 
					                [ngStyle]="{'width': (block.weight / stateService.env.BLOCK_WEIGHT_UNITS)*100 + '%' }"></div>
 | 
				
			||||||
@ -82,34 +88,34 @@
 | 
				
			|||||||
      <ng-template #skeleton>
 | 
					      <ng-template #skeleton>
 | 
				
			||||||
        <tbody>
 | 
					        <tbody>
 | 
				
			||||||
          <tr *ngFor="let item of skeletonLines">
 | 
					          <tr *ngFor="let item of skeletonLines">
 | 
				
			||||||
            <td class="height text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					            <td class="height text-left" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
					              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					            <td *ngIf="isMempoolModule" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
              <span class="skeleton-loader" style="max-width: 125px"></span>
 | 
					              <span class="skeleton-loader" style="max-width: 125px"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td class="timestamp" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
 | 
					            <td class="timestamp" *ngIf="!widget" [class]="isMempoolModule ? '' : 'legacy'">
 | 
				
			||||||
              <span class="skeleton-loader" style="max-width: 150px"></span>
 | 
					              <span class="skeleton-loader" style="max-width: 150px"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td class="mined" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
 | 
					            <td class="mined" *ngIf="!widget" [class]="isMempoolModule ? '' : 'legacy'">
 | 
				
			||||||
              <span class="skeleton-loader" style="max-width: 125px"></span>
 | 
					              <span class="skeleton-loader" style="max-width: 125px"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td *ngIf="auditAvailable" class="health text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					            <td *ngIf="auditAvailable" class="health text-right" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
					              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td *ngIf="indexingAvailable" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					            <td *ngIf="isMempoolModule" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
					              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td *ngIf="indexingAvailable && !widget" class="fees text-right" [class]="indexingAvailable ? '' : 'legacy'">
 | 
					            <td *ngIf="isMempoolModule && !widget" class="fees text-right" [class]="isMempoolModule ? '' : 'legacy'">
 | 
				
			||||||
              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
					              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td *ngIf="auditAvailable && !widget" class="fee-delta" [class]="indexingAvailable ? '' : 'legacy'">
 | 
					            <td *ngIf="auditAvailable && !widget" class="fee-delta" [class]="isMempoolModule ? '' : 'legacy'">
 | 
				
			||||||
              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
					              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td class="txs text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
 | 
					            <td class="txs text-right" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
 | 
				
			||||||
              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
					              <span class="skeleton-loader" style="max-width: 75px"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td class="size" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
 | 
					            <td class="size" *ngIf="!widget" [class]="isMempoolModule ? '' : 'legacy'">
 | 
				
			||||||
              <span class="skeleton-loader"></span>
 | 
					              <span class="skeleton-loader"></span>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
          </tr>
 | 
					          </tr>
 | 
				
			||||||
 | 
				
			|||||||
@ -17,6 +17,7 @@ export class BlocksList implements OnInit {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  blocks$: Observable<BlockExtended[]> = undefined;
 | 
					  blocks$: Observable<BlockExtended[]> = undefined;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  isMempoolModule = false;
 | 
				
			||||||
  indexingAvailable = false;
 | 
					  indexingAvailable = false;
 | 
				
			||||||
  auditAvailable = false;
 | 
					  auditAvailable = false;
 | 
				
			||||||
  isLoading = true;
 | 
					  isLoading = true;
 | 
				
			||||||
@ -36,6 +37,7 @@ export class BlocksList implements OnInit {
 | 
				
			|||||||
    public stateService: StateService,
 | 
					    public stateService: StateService,
 | 
				
			||||||
    private cd: ChangeDetectorRef,
 | 
					    private cd: ChangeDetectorRef,
 | 
				
			||||||
  ) {
 | 
					  ) {
 | 
				
			||||||
 | 
					    this.isMempoolModule = this.stateService.env.BASE_MODULE === 'mempool';
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ngOnInit(): void {
 | 
					  ngOnInit(): void {
 | 
				
			||||||
@ -64,11 +66,10 @@ export class BlocksList implements OnInit {
 | 
				
			|||||||
                this.lastBlockHeight = Math.max(...blocks.map(o => o.height));
 | 
					                this.lastBlockHeight = Math.max(...blocks.map(o => o.height));
 | 
				
			||||||
              }),
 | 
					              }),
 | 
				
			||||||
              map(blocks => {
 | 
					              map(blocks => {
 | 
				
			||||||
                if (this.indexingAvailable) {
 | 
					                if (this.stateService.env.BASE_MODULE === 'mempool') {
 | 
				
			||||||
                  for (const block of blocks) {
 | 
					                  for (const block of blocks) {
 | 
				
			||||||
                    // @ts-ignore: Need to add an extra field for the template
 | 
					                    // @ts-ignore: Need to add an extra field for the template
 | 
				
			||||||
                    block.extras.pool.logo = `/resources/mining-pools/` +
 | 
					                    block.extras.pool.logo = `/resources/mining-pools/` + block.extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg';
 | 
				
			||||||
                      block.extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg';
 | 
					 | 
				
			||||||
                  }
 | 
					                  }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (this.widget) {
 | 
					                if (this.widget) {
 | 
				
			||||||
@ -99,7 +100,7 @@ export class BlocksList implements OnInit {
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
          if (blocks[1]) {
 | 
					          if (blocks[1]) {
 | 
				
			||||||
            this.blocksCount = Math.max(this.blocksCount, blocks[1][0].height) + 1;
 | 
					            this.blocksCount = Math.max(this.blocksCount, blocks[1][0].height) + 1;
 | 
				
			||||||
            if (this.stateService.env.MINING_DASHBOARD) {
 | 
					            if (this.isMempoolModule) {
 | 
				
			||||||
              // @ts-ignore: Need to add an extra field for the template
 | 
					              // @ts-ignore: Need to add an extra field for the template
 | 
				
			||||||
              blocks[1][0].extras.pool.logo = `/resources/mining-pools/` +
 | 
					              blocks[1][0].extras.pool.logo = `/resources/mining-pools/` +
 | 
				
			||||||
                blocks[1][0].extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg';
 | 
					                blocks[1][0].extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg';
 | 
				
			||||||
@ -110,9 +111,11 @@ export class BlocksList implements OnInit {
 | 
				
			|||||||
          return acc;
 | 
					          return acc;
 | 
				
			||||||
        }, []),
 | 
					        }, []),
 | 
				
			||||||
        switchMap((blocks) => {
 | 
					        switchMap((blocks) => {
 | 
				
			||||||
          blocks.forEach(block => {
 | 
					          if (this.isMempoolModule && this.auditAvailable) {
 | 
				
			||||||
            block.extras.feeDelta = block.extras.expectedFees ? (block.extras.totalFees - block.extras.expectedFees) / block.extras.expectedFees : 0;
 | 
					            blocks.forEach(block => {
 | 
				
			||||||
          });
 | 
					              block.extras.feeDelta = block.extras.expectedFees ? (block.extras.totalFees - block.extras.expectedFees) / block.extras.expectedFees : 0;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
          return of(blocks);
 | 
					          return of(blocks);
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user