Liquidator: disable allow-borrow, now that fixed program is deployed
This commit is contained in:
parent
af5f622bd8
commit
82864e5f6f
|
@ -175,8 +175,7 @@ pub fn zero_all_non_quote(
|
||||||
// Any remainder that could not be sold just gets withdrawn to ensure the
|
// Any remainder that could not be sold just gets withdrawn to ensure the
|
||||||
// TokenPosition is freed up
|
// TokenPosition is freed up
|
||||||
if amount > 0 && amount <= dust_threshold {
|
if amount > 0 && amount <= dust_threshold {
|
||||||
// TODO: fix to false once program updated to fix allow_borrow bug
|
let allow_borrow = false;
|
||||||
let allow_borrow = true;
|
|
||||||
let txsig =
|
let txsig =
|
||||||
mango_client.token_withdraw(token_mint, amount.to_num::<u64>(), allow_borrow)?;
|
mango_client.token_withdraw(token_mint, amount.to_num::<u64>(), allow_borrow)?;
|
||||||
log::info!(
|
log::info!(
|
||||||
|
|
|
@ -70,7 +70,7 @@ async function main() {
|
||||||
const amount = token.native(bank).toNumber();
|
const amount = token.native(bank).toNumber();
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
try {
|
try {
|
||||||
const allowBorrow = true; // TODO: set this to false once the withdraw amount ___<___ nativePosition bug is fixed
|
const allowBorrow = false;
|
||||||
await client.tokenWithdrawNative(
|
await client.tokenWithdrawNative(
|
||||||
group,
|
group,
|
||||||
account,
|
account,
|
||||||
|
|
Loading…
Reference in New Issue