Added fiat balance to address and made fiat balance into a component.

This commit is contained in:
softsimon
2020-03-02 17:29:00 +07:00
parent 29953e12de
commit bab4761c24
11 changed files with 60 additions and 15 deletions

View File

@@ -32,7 +32,7 @@
<ng-template [ngIf]="tx.fee">
<tr>
<td>Fees</td>
<td>{{ tx.fee | number }} sats <span *ngIf="conversions">(<span class="green-color">{{ conversions.USD * tx.fee / 100000000 | currency:'USD':'symbol':'1.2-2' }}</span>)</span></td>
<td>{{ tx.fee | number }} sats (<app-fiat [value]="tx.fee"></app-fiat>)</td>
</tr>
<tr>
<td>Fees per vByte</td>
@@ -67,7 +67,7 @@
</ng-template>
<tr>
<td>Fees</td>
<td>{{ tx.fee | number }} sats <span *ngIf="conversions">(<span class="green-color">{{ conversions.USD * tx.fee / 100000000 | currency:'USD':'symbol':'1.2-2' }}</span>)</span></td>
<td>{{ tx.fee | number }} sats (<app-fiat [value]="tx.fee"></app-fiat>)</td>
</tr>
<tr>
<td>Fees per vByte</td>

View File

@@ -18,7 +18,6 @@ export class TransactionComponent implements OnInit, OnDestroy {
tx: Transaction;
txId: string;
isLoadingTx = true;
conversions: any;
error: any = undefined;
latestBlock: Block;
transactionTime = -1;
@@ -66,9 +65,6 @@ export class TransactionComponent implements OnInit, OnDestroy {
this.isLoadingTx = false;
});
this.stateService.conversions$
.subscribe((conversions) => this.conversions = conversions);
this.stateService.blocks$
.subscribe((block) => this.latestBlock = block);