mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 14:50:52 +01:00
Merge pull request #4807 from mempool/nymkappa/cleanup-lightning-code
[refactor] cleanup dead code
This commit is contained in:
commit
1b971bfb05
7 changed files with 0 additions and 71 deletions
|
@ -34,7 +34,6 @@ import { OldestNodes } from '../lightning/nodes-ranking/oldest-nodes/oldest-node
|
|||
import { NodesRankingsDashboard } from '../lightning/nodes-rankings-dashboard/nodes-rankings-dashboard.component';
|
||||
import { NodeChannels } from '../lightning/nodes-channels/node-channels.component';
|
||||
import { GroupComponent } from './group/group.component';
|
||||
import { NodeOwnerComponent } from './node-owner/node-owner.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
@ -67,7 +66,6 @@ import { NodeOwnerComponent } from './node-owner/node-owner.component';
|
|||
NodesRankingsDashboard,
|
||||
NodeChannels,
|
||||
GroupComponent,
|
||||
NodeOwnerComponent,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
|
@ -105,7 +103,6 @@ import { NodeOwnerComponent } from './node-owner/node-owner.component';
|
|||
OldestNodes,
|
||||
NodesRankingsDashboard,
|
||||
NodeChannels,
|
||||
NodeOwnerComponent,
|
||||
],
|
||||
providers: [
|
||||
LightningApiService,
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<div *ngIf="stateService.env.OFFICIAL_MEMPOOL_SPACE === true">
|
||||
|
||||
<div *ngIf="{ value: (nodeOwner$ | async) } as nodeOwner">
|
||||
|
||||
<div *ngIf="nodeOwner.value && nodeOwner.value.sns_id">
|
||||
<a target="_blank" [href]="'https://twitter.com/' + nodeOwner.value.username">
|
||||
<img class="profile-photo" [src]="'data:' + nodeOwner.value.image_mime + ';base64,' + nodeOwner.value.image">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div *ngIf="nodeOwner.value === false">
|
||||
<a [href]="'/login/lnnode?type=signup&pubkey=' + publicKey + '&alias=' + alias" class="btn btn-primary btn-sm">Claim</a>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -1,4 +0,0 @@
|
|||
.profile-photo {
|
||||
width: 31px;
|
||||
height: 31px;
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { StateService } from '../../services/state.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-node-owner',
|
||||
templateUrl: './node-owner.component.html',
|
||||
styleUrls: ['./node-owner.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class NodeOwnerComponent{
|
||||
@Input() publicKey: string = '';
|
||||
@Input() alias: string = '';
|
||||
@Input() nodeOwner$: Observable<any>;
|
||||
|
||||
constructor(
|
||||
public stateService: StateService
|
||||
) {
|
||||
}
|
||||
}
|
|
@ -5,7 +5,6 @@
|
|||
<div class="title-container mb-2">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h1 class="mb-0 text-truncate">{{ node.alias }}</h1>
|
||||
<!-- <app-node-owner [nodeOwner$]="nodeOwner$" [publicKey]="node.public_key" [alias]="node.alias" class="claim-btn"></app-node-owner> -->
|
||||
</div>
|
||||
<span class="tx-link justify-content-between align-items-center">
|
||||
<span class="node-id">
|
||||
|
@ -13,7 +12,6 @@
|
|||
<app-clipboard [text]="node.public_key"></app-clipboard>
|
||||
</app-truncate>
|
||||
</span>
|
||||
<!-- <app-node-owner [nodeOwner$]="nodeOwner$" [publicKey]="node.public_key" [alias]="node.alias" class="claim-btn-mobile"></app-node-owner> -->
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
|
|
@ -39,7 +39,6 @@ export class NodeComponent implements OnInit {
|
|||
tlvRecords: CustomRecord[];
|
||||
avgChannelDistance$: Observable<number | null>;
|
||||
showFeatures = false;
|
||||
nodeOwner$: Observable<any>;
|
||||
kmToMiles = kmToMiles;
|
||||
|
||||
constructor(
|
||||
|
@ -153,24 +152,6 @@ export class NodeComponent implements OnInit {
|
|||
return null;
|
||||
})
|
||||
) as Observable<number | null>;
|
||||
|
||||
this.nodeOwner$ = this.activatedRoute.paramMap
|
||||
.pipe(
|
||||
switchMap((params: ParamMap) => {
|
||||
return this.servicesApiService.getNodeOwner$(params.get('public_key')).pipe(
|
||||
switchMap((response) => {
|
||||
if (response.status === 204) {
|
||||
return of(false);
|
||||
}
|
||||
return of(response.body);
|
||||
}),
|
||||
catchError(() => {
|
||||
return of(false);
|
||||
})
|
||||
)
|
||||
}),
|
||||
share(),
|
||||
);
|
||||
}
|
||||
|
||||
toggleShowDetails(): void {
|
||||
|
|
|
@ -104,12 +104,6 @@ export class ServicesApiServices {
|
|||
return this.httpClient.get<any>(`${SERVICES_API_PREFIX}/account`);
|
||||
}
|
||||
|
||||
getNodeOwner$(publicKey: string): Observable<any> {
|
||||
let params = new HttpParams()
|
||||
.set('node_public_key', publicKey);
|
||||
return this.httpClient.get<any>(`${SERVICES_API_PREFIX}/lightning/claim/current`, { params, observe: 'response' });
|
||||
}
|
||||
|
||||
getUserMenuGroups$(): Observable<MenuGroup[]> {
|
||||
const auth = this.storageService.getAuth();
|
||||
if (!auth) {
|
||||
|
|
Loading…
Add table
Reference in a new issue