fix getAverageEntryPrice so it divides instead of multiplies (#402)
This commit is contained in:
parent
1a3d0da34a
commit
8fb231f2fc
|
@ -1334,7 +1334,7 @@ export class PerpPosition {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAverageEntryPrice(perpMarket: PerpMarket): I80F48 {
|
public getAverageEntryPrice(perpMarket: PerpMarket): I80F48 {
|
||||||
return I80F48.fromNumber(this.avgEntryPricePerBaseLot).mul(
|
return I80F48.fromNumber(this.avgEntryPricePerBaseLot).div(
|
||||||
I80F48.fromI64(perpMarket.baseLotSize),
|
I80F48.fromI64(perpMarket.baseLotSize),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue