Fix node page and display real time data
This commit is contained in:
@@ -5,6 +5,7 @@ import { catchError, map, switchMap } from 'rxjs/operators';
|
||||
import { SeoService } from 'src/app/services/seo.service';
|
||||
import { getFlagEmoji } from 'src/app/shared/graphs.utils';
|
||||
import { LightningApiService } from '../lightning-api.service';
|
||||
import { isMobile } from '../../shared/common.utils';
|
||||
|
||||
@Component({
|
||||
selector: 'app-node',
|
||||
@@ -23,11 +24,17 @@ export class NodeComponent implements OnInit {
|
||||
error: Error;
|
||||
publicKey: string;
|
||||
|
||||
publicKeySize = 99;
|
||||
|
||||
constructor(
|
||||
private lightningApiService: LightningApiService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private seoService: SeoService,
|
||||
) { }
|
||||
) {
|
||||
if (isMobile()) {
|
||||
this.publicKeySize = 12;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.node$ = this.activatedRoute.paramMap
|
||||
@@ -59,6 +66,7 @@ export class NodeComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
node.socketsObject = socketsObject;
|
||||
node.avgCapacity = node.capacity / Math.max(1, node.active_channel_count);
|
||||
return node;
|
||||
}),
|
||||
catchError(err => {
|
||||
|
||||
Reference in New Issue
Block a user