update nodes

tweak borrow and withdraw fn to account for rounding errors
This commit is contained in:
Tyler Shipe 2021-05-04 15:44:53 -04:00
parent 260715cc6f
commit f827718f50
2 changed files with 3 additions and 3 deletions

View File

@ -18,8 +18,8 @@ import { notify } from '../utils/notifications'
export const ENDPOINTS: EndpointInfo[] = [
{
name: 'mainnet-beta',
url: 'https://vip-api.mainnet-beta.solana.com/',
websocket: 'https://api.mainnet-beta.solana.com/',
url: 'https://mango.rpcpool.com/',
websocket: 'https://mango.rpcpool.com/',
custom: false,
},
{

View File

@ -412,7 +412,7 @@ export async function borrowAndWithdraw(
const nativeWithdrawQuantity = new BN(
Math.floor(
withdrawQuantity * Math.pow(10, mangoGroup.mintDecimals[tokenIndex])
)
) - 1
)
const withdrawInstruction = makeWithdrawInstruction(