Sats component rounding

This commit is contained in:
softsimon 2022-07-01 15:24:14 +02:00
parent 4d83478e7d
commit 3152effba5
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
3 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@
<tr>
<td i18n="address.total-sent">Base fee</td>
<td>
<app-sats [satoshis]="channel.base_fee_mtokens / 1000"></app-sats>
<app-sats [satoshis]="channel.base_fee_mtokens / 1000" digitsInfo="1.0-2"></app-sats>
</td>
</tr>
<tr>

View File

@ -1,4 +1,4 @@
&lrm;{{ addPlus && satoshis >= 0 ? '+' : '' }}{{ satoshis | number : '1.0-0' }}
&lrm;{{ addPlus && satoshis >= 0 ? '+' : '' }}{{ satoshis | number : digitsInfo }}
<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>

View File

@ -9,7 +9,7 @@ import { StateService } from '../../../services/state.service';
})
export class SatsComponent implements OnInit {
@Input() satoshis: number;
@Input() digitsInfo = 0;
@Input() digitsInfo = '1.0-0';
@Input() addPlus = false;
network = '';