add sim health calls to debug script

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2023-01-20 08:29:36 +01:00
parent e7b51d1dbf
commit 3fd8d7f615
1 changed files with 24 additions and 0 deletions

View File

@ -188,6 +188,18 @@ async function debugUser(
serum3Market.serumMarketExternal,
),
);
console.log(
`- simHealthRatioWithSerum3BidUiChanges ${serum3Market.name} ` +
mangoAccount.simHealthRatioWithSerum3BidUiChanges(
group,
mangoAccount.getMaxQuoteForSerum3BidUi(
group,
serum3Market.serumMarketExternal,
),
serum3Market.serumMarketExternal,
HealthType.init,
),
);
console.log(
`getMaxBaseForSerum3AskUi ${serum3Market.name} ` +
mangoAccount.getMaxBaseForSerum3AskUi(
@ -195,6 +207,18 @@ async function debugUser(
serum3Market.serumMarketExternal,
),
);
console.log(
`- simHealthRatioWithSerum3BidUiChanges ${serum3Market.name} ` +
mangoAccount.simHealthRatioWithSerum3AskUiChanges(
group,
mangoAccount.getMaxBaseForSerum3AskUi(
group,
serum3Market.serumMarketExternal,
),
serum3Market.serumMarketExternal,
HealthType.init,
),
);
}
for (const serum3Market of Array.from(
group.serum3MarketsMapByExternal.values(),