Send partial liquidate instruction just to force settle borrow
This commit is contained in:
parent
ecd854f601
commit
c5cfcad99a
|
@ -450,7 +450,11 @@ async function runPartialLiquidator() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (minNetIndex !== -1) {
|
if (minNetIndex === -1) {
|
||||||
|
// In this case, send a random token account that is not maxNetIndex
|
||||||
|
minNetIndex = (maxNetIndex + 1) % NUM_TOKENS;
|
||||||
|
}
|
||||||
|
|
||||||
transaction.add(
|
transaction.add(
|
||||||
makePartialLiquidateInstruction(
|
makePartialLiquidateInstruction(
|
||||||
programId,
|
programId,
|
||||||
|
@ -467,11 +471,7 @@ async function runPartialLiquidator() {
|
||||||
liqorTokenValues[minNetIndex],
|
liqorTokenValues[minNetIndex],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
if (transaction.instructions.length === 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
await client.sendTransaction(connection, transaction, payer, []);
|
await client.sendTransaction(connection, transaction, payer, []);
|
||||||
await sleep(2000);
|
await sleep(2000);
|
||||||
ma = await client.getMarginAccount(
|
ma = await client.getMarginAccount(
|
||||||
|
|
Loading…
Reference in New Issue