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
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>