mirror of
https://github.com/mempool/mempool.git
synced 2026-08-13 12:33:11 +02:00
Merge pull request #6190 from mempool/knorrium/fix_lightning_rankings
Fix the lightning node rankings dashboard
This commit is contained in:
commit
16907fc207
2 changed files with 5 additions and 3 deletions
|
|
@ -10,7 +10,7 @@
|
|||
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true"
|
||||
style="vertical-align: text-top; font-size: 13px; color: var(--title-fg)"></fa-icon>
|
||||
</a>
|
||||
<app-top-nodes-per-capacity [nodes$]="nodesRanking$" [widget]="true"></app-top-nodes-per-capacity>
|
||||
<app-top-nodes-per-capacity [nodes$]="nodesRanking$" [statistics$]="statistics$" [widget]="true"></app-top-nodes-per-capacity>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true"
|
||||
style="vertical-align: text-top; font-size: 13px; color: var(--title-fg)"></fa-icon>
|
||||
</a>
|
||||
<app-top-nodes-per-channels [nodes$]="nodesRanking$" [widget]="true"></app-top-nodes-per-channels>
|
||||
<app-top-nodes-per-channels [nodes$]="nodesRanking$" [statistics$]="statistics$" [widget]="true"></app-top-nodes-per-channels>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { Observable, share } from 'rxjs';
|
||||
import { INodesRanking } from '@interfaces/node-api.interface';
|
||||
import { INodesRanking, INodesStatistics } from '@interfaces/node-api.interface';
|
||||
import { SeoService } from '@app/services/seo.service';
|
||||
import { LightningApiService } from '@app/lightning/lightning-api.service';
|
||||
|
||||
|
|
@ -13,6 +13,7 @@ import { LightningApiService } from '@app/lightning/lightning-api.service';
|
|||
})
|
||||
export class NodesRankingsDashboard implements OnInit {
|
||||
nodesRanking$: Observable<INodesRanking>;
|
||||
statistics$: Observable<INodesStatistics>;
|
||||
|
||||
constructor(
|
||||
private lightningApiService: LightningApiService,
|
||||
|
|
@ -23,5 +24,6 @@ export class NodesRankingsDashboard implements OnInit {
|
|||
this.seoService.setTitle($localize`Top lightning nodes`);
|
||||
this.seoService.setDescription($localize`:@@meta.description.lightning.rankings-dashboard:See the top Lightning network nodes ranked by liquidity, connectivity, and age.`);
|
||||
this.nodesRanking$ = this.lightningApiService.getNodesRanking$().pipe(share());
|
||||
this.statistics$ = this.lightningApiService.getLatestStatistics$().pipe(share());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue