Skip to content

Commit

Permalink
fix: uncaught-tx-serializer-error
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasDeco committed Aug 19, 2024
1 parent d2de61e commit 7eaf1fe
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/indexer/src/transaction/serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
InstructionDisplay,
Instruction as AnchorInstruction,
} from "@coral-xyz/anchor/dist/cjs/coder/borsh/instruction";
import { logger } from "../logger";

/**
* This version should be bumped every time we update this file.
Expand Down Expand Up @@ -401,13 +402,17 @@ function getIxWithDisplay(
};
}
});
try {
const ixDisplay = coder.format(decodedIx, accounts);

const ixDisplay = coder.format(decodedIx, accounts);

return {
instruction: decodedIx,
instructionDisplay: ixDisplay,
};
return {
instruction: decodedIx,
instructionDisplay: ixDisplay,
};
} catch (e) {
logger.error("error with coder formatting of decodedIx:", e);
return null;
}
}

function flattenIdlAccounts(
Expand Down

0 comments on commit 7eaf1fe

Please sign in to comment.