Merge branch '5_tokens' of github.com:blockworks-foundation/mango-client-ts into 5_tokens

This commit is contained in:
Ralfs 2021-06-01 22:46:27 +03:00
commit 19d8c34a17
1 changed files with 2 additions and 0 deletions

View File

@ -348,6 +348,8 @@ async function stressTestLiquidation(params: {
));
let liquidationTxHash: string;
if (shouldPartialLiquidate) {
const forceCancelTx = await client.forceCancelOrders(connection, mangoProgramId, mangoGroup, liqeeMarginAccount, liqorOwner, spotMarket, 5)
console.log('forceCancelTxHash', forceCancelTx)
liquidationTxHash = await client.partialLiquidate(connection, mangoProgramId, mangoGroup, liqeeMarginAccount, liqorOwner, tokenWallets[quoteSymbolIndex], tokenWallets[baseSymbolIndex], quoteSymbolIndex, baseSymbolIndex, neededQuoteAmountForAllTrades);
} else {
const depositQuantities = new Array(tokenWallets.length).fill(0);