Merge pull request #1173 from mempool/simon/liquid-asset-precision-fix

Fixing Liquid asset precision
This commit is contained in:
wiz 2022-01-25 08:15:20 +00:00 committed by GitHub
commit cba46a82aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -270,7 +270,7 @@
</ng-container>
<ng-template #assetBox let-item>
{{ item.value / 100000000 | number: '1.0-' + assetsMinimal[item.asset][3] }} {{ assetsMinimal[item.asset][1] }}
{{ item.value / pow(10, assetsMinimal[item.asset][3]) | number: '1.' + assetsMinimal[item.asset][3] + '-' + assetsMinimal[item.asset][3] }} {{ assetsMinimal[item.asset][1] }}
<br />
{{ assetsMinimal[item.asset][0] }}
<br />

View File

@ -119,6 +119,10 @@ export class TransactionsListComponent implements OnInit, OnChanges {
return '0x' + (str.length % 2 ? '0' : '') + str;
}
pow(base: number, exponent: number): number {
return Math.pow(base, exponent);
}
toggleDetails() {
this.displayDetails = !this.displayDetails;
this.ref.markForCheck();