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(); .instruction();
const tx = new Transaction(); const tx = new Transaction();
for (const i of preInstructions) { for (const ix of preInstructions) {
tx.add(i); tx.add(ix);
} }
tx.add(flashLoanBeginIx); tx.add(flashLoanBeginIx);
for (const i of userDefinedInstructions) { for (const ix of userDefinedInstructions.filter(
tx.add(i); (ix) => ix.keys.length > 2,
)) {
tx.add(ix);
} }
tx.add(flashLoanEndIx); tx.add(flashLoanEndIx);