filter out jupiter token ledger instruction to save space

This commit is contained in:
tjs 2022-09-02 18:47:26 -04:00
parent c359ce26a7
commit 2d0772833b
1 changed files with 6 additions and 4 deletions

View File

@ -1692,12 +1692,14 @@ export class MangoClient {
.instruction();
const tx = new Transaction();
for (const i of preInstructions) {
tx.add(i);
for (const ix of preInstructions) {
tx.add(ix);
}
tx.add(flashLoanBeginIx);
for (const i of userDefinedInstructions) {
tx.add(i);
for (const ix of userDefinedInstructions.filter(
(ix) => ix.keys.length > 2,
)) {
tx.add(ix);
}
tx.add(flashLoanEndIx);