update nodes
tweak borrow and withdraw fn to account for rounding errors
This commit is contained in:
parent
260715cc6f
commit
f827718f50
|
@ -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,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue