Display correct BTC unit depending on network.

This commit is contained in:
softsimon 2020-07-24 11:49:36 +07:00
parent 9980414969
commit c7a09ffbfc
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
2 changed files with 5 additions and 19 deletions

View File

@ -15,32 +15,18 @@
<div class="row">
<div class="col">
<table class="table table-borderless table-striped">
<tbody *ngIf="network !== 'liquid'">
<tbody>
<tr>
<td>Total received</td>
<td>{{ receieved / 100000000 | number: '1.8-8' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC</td>
<td><app-amount [satoshis]="receieved"></app-amount></td>
</tr>
<tr>
<td>Total sent</td>
<td>{{ sent / 100000000 | number: '1.8-8' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC</td>
<td><app-amount [satoshis]="sent"></app-amount></td>
</tr>
<tr>
<td>Balance</td>
<td>{{ (receieved - sent) / 100000000 | number: '1.8-8' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC (<app-fiat [value]="receieved - sent"></app-fiat>)</td>
</tr>
</tbody>
<tbody *ngIf="network === 'liquid'">
<tr>
<td>Total received</td>
<td>Confidential</td>
</tr>
<tr>
<td>Total sent</td>
<td>Confidential</td>
</tr>
<tr>
<td>Balance</td>
<td>Confidential</td>
<td><app-amount [satoshis]="receieved - sent"></app-amount> (<app-fiat [value]="receieved - sent"></app-fiat>)</td>
</tr>
</tbody>
</table>

View File

@ -22,7 +22,7 @@
</tr>
<tr>
<td>Total fees</td>
<td>{{ mempoolBlock.totalFees / 100000000 | number : '1.2-2' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC (<app-fiat [value]="mempoolBlock.totalFees" digitsInfo="1.0-0"></app-fiat>)</td>
<td><app-amount [satoshis]="mempoolBlock.totalFees" [digitsInfo]="'1.2-2'"></app-amount> (<app-fiat [value]="mempoolBlock.totalFees" digitsInfo="1.0-0"></app-fiat>)</td>
</tr>
<tr>
<td>Transactions</td>