Browse Source

Improve numerical precision for cryptocurrency quantities

pull/6038/head
Thomas Kaul 3 days ago
parent
commit
d2e05a0db8
  1. 6
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts

6
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts

@ -411,10 +411,10 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit {
if (Number.isInteger(this.quantity)) { if (Number.isInteger(this.quantity)) {
this.quantityPrecision = 0; this.quantityPrecision = 0;
} else if (SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') { } else if (SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') {
if (this.quantity < 1) { if (this.quantity < 10) {
this.quantityPrecision = 7; this.quantityPrecision = 8;
} else if (this.quantity < 1000) { } else if (this.quantity < 1000) {
this.quantityPrecision = 5; this.quantityPrecision = 6;
} else if (this.quantity >= 10000000) { } else if (this.quantity >= 10000000) {
this.quantityPrecision = 0; this.quantityPrecision = 0;
} }

Loading…
Cancel
Save