Browse Source
Task/increase numerical precision for cryptocurrency quantities in holding detail dialog (#6038)
* Increase numerical precision for cryptocurrency quantities
* Update changelog
pull/6039/head
Thomas Kaul
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
4 additions and
3 deletions
-
CHANGELOG.md
-
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts
|
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
#### Changed |
|
|
|
|
|
|
|
- Increased the numerical precision for cryptocurrency quantities in the holding detail dialog |
|
|
|
- Upgraded `envalid` from version `8.1.0` to `8.1.1` |
|
|
|
- Upgraded `prettier` from version `3.7.3` to `3.7.4` |
|
|
|
|
|
|
|
|
|
|
|
@ -411,10 +411,10 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit { |
|
|
|
if (Number.isInteger(this.quantity)) { |
|
|
|
this.quantityPrecision = 0; |
|
|
|
} else if (SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') { |
|
|
|
if (this.quantity < 1) { |
|
|
|
this.quantityPrecision = 7; |
|
|
|
if (this.quantity < 10) { |
|
|
|
this.quantityPrecision = 8; |
|
|
|
} else if (this.quantity < 1000) { |
|
|
|
this.quantityPrecision = 5; |
|
|
|
this.quantityPrecision = 6; |
|
|
|
} else if (this.quantity >= 10000000) { |
|
|
|
this.quantityPrecision = 0; |
|
|
|
} |
|
|
|
|