Browse Source

Feature: Adjust quantity precision for Bitcoin in holding detail dialog and activities table

pull/6029/head
Joarley Santos 2 months ago
parent
commit
e91b6f2e65
  1. 4
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts
  2. 1
      libs/ui/src/lib/activities-table/activities-table.component.html

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

@ -407,7 +407,9 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit {
if (Number.isInteger(this.quantity)) {
this.quantityPrecision = 0;
} else if (SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') {
if (this.quantity < 1) {
if (SymbolProfile?.symbol === 'BTC' || SymbolProfile?.symbol === "bitcoin") {
this.quantityPrecision = 8;
} else if (this.quantity < 1) {
this.quantityPrecision = 7;
} else if (this.quantity < 1000) {
this.quantityPrecision = 5;

1
libs/ui/src/lib/activities-table/activities-table.component.html

@ -196,6 +196,7 @@
<gf-value
[isCurrency]="true"
[locale]="locale"
[precision]="element.SymbolProfile?.symbol === 'BTC' || element.SymbolProfile?.symbol === 'bitcoin' ? 8 : undefined"
[value]="isLoading ? undefined : element.quantity"
/>
</div>

Loading…
Cancel
Save