Label channel closes

This commit is contained in:
softsimon
2022-06-30 00:35:27 +02:00
parent 4bb23cf0c8
commit da9834d272
7 changed files with 26 additions and 14 deletions

View File

@@ -34,7 +34,8 @@ export class AddressLabelsComponent implements OnChanges {
}
handleChannel() {
this.label = `Channel open: ${this.channel.node_left.alias} <> ${this.channel.node_right.alias}`;
const type = this.vout ? 'open' : 'close';
this.label = `Channel ${type}: ${this.channel.node_left.alias} <> ${this.channel.node_right.alias}`;
}
handleVin() {

View File

@@ -77,7 +77,7 @@
{{ vin.prevout.scriptpubkey_type?.toUpperCase() }}
</ng-template>
<div>
<app-address-labels [vin]="vin"></app-address-labels>
<app-address-labels [vin]="vin" [channel]="channels && channels.inputs[i] || null"></app-address-labels>
</div>
</ng-template>
</ng-container>
@@ -172,7 +172,7 @@
</span>
</a>
<div>
<app-address-labels [vout]="vout" [channel]="channels && channels[i] && channels[i].transaction_vout === vindex ? channels[i] : null"></app-address-labels>
<app-address-labels [vout]="vout" [channel]="channels && channels.outputs[i] && channels.outputs[i].transaction_vout === vindex ? channels.outputs[i] : null"></app-address-labels>
</div>
<ng-template #scriptpubkey_type>
<ng-template [ngIf]="vout.pegout" [ngIfElse]="defaultscriptpubkey_type">

View File

@@ -36,7 +36,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
showDetails$ = new BehaviorSubject<boolean>(false);
outspends: Outspend[][] = [];
assetsMinimal: any;
channels: any[];
channels: { inputs: any[], outputs: any[] };
constructor(
public stateService: StateService,