Auto approve support for MANGO_PROGRAM_ID_V2 (#276)
This commit is contained in:
parent
80b425c2f5
commit
f9482395dc
|
@ -26,6 +26,9 @@ const RAYDIUM_LP_PROGRAM_ID = new PublicKey(
|
||||||
const MANGO_PROGRAM_ID = new PublicKey(
|
const MANGO_PROGRAM_ID = new PublicKey(
|
||||||
'JD3bq9hGdy38PuWQ4h2YJpELmHVGPPfFSuFkpzAd9zfu',
|
'JD3bq9hGdy38PuWQ4h2YJpELmHVGPPfFSuFkpzAd9zfu',
|
||||||
);
|
);
|
||||||
|
const MANGO_PROGRAM_ID_V2 = new PublicKey(
|
||||||
|
'5fNfvyp5czQVX77yoACa3JJVEhdRaWjPuazuWgjhTqEH',
|
||||||
|
);
|
||||||
|
|
||||||
const marketCache = {};
|
const marketCache = {};
|
||||||
let marketCacheConnection = null;
|
let marketCacheConnection = null;
|
||||||
|
@ -133,7 +136,7 @@ const toInstruction = async (
|
||||||
accountKeys,
|
accountKeys,
|
||||||
decodedInstruction,
|
decodedInstruction,
|
||||||
);
|
);
|
||||||
} else if (programId.equals(MANGO_PROGRAM_ID)) {
|
} else if (programId.equals(MANGO_PROGRAM_ID) || programId.equals(MANGO_PROGRAM_ID_V2)) {
|
||||||
console.log('[' + index + '] Handled as mango markets instruction');
|
console.log('[' + index + '] Handled as mango markets instruction');
|
||||||
let decodedInstruction = decodeMangoInstruction(decoded);
|
let decodedInstruction = decodeMangoInstruction(decoded);
|
||||||
return await handleMangoInstruction(
|
return await handleMangoInstruction(
|
||||||
|
|
Loading…
Reference in New Issue