update script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
2957796de8
commit
b7189696d8
|
@ -42,7 +42,9 @@ async function main(): Promise<void> {
|
|||
.perpActive()
|
||||
.find((pp) => pp.marketIndex === perpMarket.perpMarketIndex);
|
||||
if (pp) {
|
||||
getUnsettledPnlUiAgg += pp.getUnsettledPnlUi(perpMarket);
|
||||
getUnsettledPnlUiAgg +=
|
||||
pp.getUnsettledPnlUi(perpMarket) -
|
||||
pp.getUnsettledFundingUi(perpMarket);
|
||||
getBasePositionUiAgg += pp.getBasePositionUi(perpMarket);
|
||||
getQuotePositionUiAgg += pp.getQuotePositionUi(perpMarket);
|
||||
longSettledFundingAgg += pp.longSettledFunding.toNumber();
|
||||
|
|
|
@ -1352,6 +1352,9 @@ export class PerpPosition {
|
|||
}
|
||||
return ZERO_I80F48();
|
||||
}
|
||||
public getUnsettledFundingUi(perpMarket: PerpMarket): number {
|
||||
return toUiDecimalsForQuote(this.getUnsettledFunding(perpMarket));
|
||||
}
|
||||
|
||||
public getEquityUi(perpMarket: PerpMarket): number {
|
||||
if (perpMarket.perpMarketIndex !== this.marketIndex) {
|
||||
|
|
Loading…
Reference in New Issue