Skip to content

Commit

Permalink
Merge pull request #246 from metaDAOproject/fix/uncaught-tx-serialize…
Browse files Browse the repository at this point in the history
…r-error

fix/uncaught tx serializer error
  • Loading branch information
LukasDeco authored Aug 19, 2024
2 parents bf4669c + 7eaf1fe commit 2efd160
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
context: .
file: packages/indexer/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: themetadao/indexer:main
labels: ${{ steps.meta.outputs.labels }}

redeploy_app:
Expand Down
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 2efd160

Please sign in to comment.