mirror of
https://github.com/mempool/mempool.git
synced 2024-11-19 01:41:01 +01:00
Merge pull request #1173 from mempool/simon/liquid-asset-precision-fix
Fixing Liquid asset precision
This commit is contained in:
commit
cba46a82aa
@ -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 />
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user