|
@ -55,6 +55,7 @@ export class PositionDetailDialog implements OnDestroy, OnInit { |
|
|
public orders: OrderWithAccount[]; |
|
|
public orders: OrderWithAccount[]; |
|
|
public quantity: number; |
|
|
public quantity: number; |
|
|
public quantityPrecision = 2; |
|
|
public quantityPrecision = 2; |
|
|
|
|
|
public stakePrecision = 2; |
|
|
public reportDataGlitchMail: string; |
|
|
public reportDataGlitchMail: string; |
|
|
public sectors: { |
|
|
public sectors: { |
|
|
[name: string]: { name: string; value: number }; |
|
|
[name: string]: { name: string; value: number }; |
|
@ -229,6 +230,13 @@ export class PositionDetailDialog implements OnDestroy, OnInit { |
|
|
|
|
|
|
|
|
if (Number.isInteger(this.quantity)) { |
|
|
if (Number.isInteger(this.quantity)) { |
|
|
this.quantityPrecision = 0; |
|
|
this.quantityPrecision = 0; |
|
|
|
|
|
if ( |
|
|
|
|
|
orders |
|
|
|
|
|
.filter((o) => o.type === 'STAKE') |
|
|
|
|
|
.every((o) => Number.isInteger(o.quantity)) |
|
|
|
|
|
) { |
|
|
|
|
|
this.stakeRewards = 0; |
|
|
|
|
|
} |
|
|
} else if (this.SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') { |
|
|
} else if (this.SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') { |
|
|
if (this.quantity < 1) { |
|
|
if (this.quantity < 1) { |
|
|
this.quantityPrecision = 7; |
|
|
this.quantityPrecision = 7; |
|
@ -237,6 +245,7 @@ export class PositionDetailDialog implements OnDestroy, OnInit { |
|
|
} else if (this.quantity > 10000000) { |
|
|
} else if (this.quantity > 10000000) { |
|
|
this.quantityPrecision = 0; |
|
|
this.quantityPrecision = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
this.stakePrecision = this.quantityPrecision; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|