Channel component

This commit is contained in:
softsimon committed 2022-07-08 18:55:22 +02:00
1 parent 1c3570113e
commit 5374fcbe9a
23 files changed
+536 -59

No files matched your search

@@ -0,0 +1,5 @@
‎{{ addPlus && satoshis >= 0 ? '+' : '' }}{{ satoshis | number }}
<span class="symbol"><ng-template [ngIf]="network === 'liquid'">L-</ng-template>
<ng-template [ngIf]="network === 'liquidtestnet'">tL-</ng-template>
<ng-template [ngIf]="network === 'testnet'">t-</ng-template>
<ng-template [ngIf]="network === 'signet'">s-</ng-template>sats</span>
Whitespace-only changes.
@@ -0,0 +1,32 @@
import { Component, Input, OnInit } from '@angular/core';
import { Subscription } from 'rxjs';
import { StateService } from '../../../services/state.service';
@Component({
selector: 'app-sats',
templateUrl: './sats.component.html',
styleUrls: ['./sats.component.scss']
})
export class SatsComponent implements OnInit {
@Input() satoshis: number;
@Input() digitsInfo = 0;
@Input() addPlus = false;
network = '';
stateSubscription: Subscription;
constructor(
private stateService: StateService,
) { }
ngOnInit() {
this.stateSubscription = this.stateService.networkChanged$.subscribe((network) => this.network = network);
}
ngOnDestroy() {
if (this.stateSubscription) {
this.stateSubscription.unsubscribe();
}
}
}