Skip to content

Commit

Permalink
remove async where not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mschneider committed Aug 13, 2024
1 parent e60435f commit 7c4ee31
Show file tree
Hide file tree
Showing 2 changed files with 199 additions and 198 deletions.
12 changes: 8 additions & 4 deletions ts/client/scripts/update-risk-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ async function setupVsr(
return vsrClient;
}

/** unused
async function getTotalLiqorEquity(
client: MangoClient,
group: Group,
Expand All @@ -127,9 +128,8 @@ async function getTotalLiqorEquity(
)
).json()
).map((data) => new PublicKey(data['liqor']));
const ttlLiqorEquity = (
await getEquityForMangoAccounts(client, group, liqors, mangoAccounts)
).reduce((partialSum, ae) => partialSum + ae.Equity.val, 0);
const ttlLiqorEquity = getEquityForMangoAccounts(client, group, liqors, mangoAccounts)
.reduce((partialSum, ae) => partialSum + ae.Equity.val, 0);
return ttlLiqorEquity;
}
Expand All @@ -152,6 +152,8 @@ function getPriceImpactForBank(
const priceImpact = tokenToPriceImpact[getApiTokenName(bank.name)];
return priceImpact;
}
*/


async function updateTokenParams(): Promise<void> {
const [client, wallet] = await Promise.all([buildClient(), setupWallet()]);
Expand Down Expand Up @@ -208,7 +210,8 @@ async function updateTokenParams(): Promise<void> {
const builder = Builder(NullTokenEditParams);
let change = false;

// try {
// unused
/*
const tier = Object.values(LISTING_PRESETS).find((x) =>
x.initLiabWeight.toFixed(1) === '1.8'
? x.initLiabWeight.toFixed(1) ===
Expand All @@ -217,6 +220,7 @@ async function updateTokenParams(): Promise<void> {
: x.initLiabWeight.toFixed(1) ===
bank?.initLiabWeight.toNumber().toFixed(1),
);
*/

// eslint-disable-next-line no-constant-condition
if (true) {
Expand Down
Loading

0 comments on commit 7c4ee31

Please sign in to comment.