From 3fd8d7f6158cc0a62b90c448a884aa0c8e71e31d Mon Sep 17 00:00:00 2001 From: microwavedcola1 Date: Fri, 20 Jan 2023 08:29:36 +0100 Subject: [PATCH] add sim health calls to debug script Signed-off-by: microwavedcola1 --- ts/client/src/debug-scripts/debug-user.ts | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ts/client/src/debug-scripts/debug-user.ts b/ts/client/src/debug-scripts/debug-user.ts index 04e99a85b..8182bec1c 100644 --- a/ts/client/src/debug-scripts/debug-user.ts +++ b/ts/client/src/debug-scripts/debug-user.ts @@ -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(),