Skip to content

Commit

Permalink
fix: add offset hash undefined check
Browse files Browse the repository at this point in the history
  • Loading branch information
ducphamle2 committed Nov 23, 2024
1 parent 16d8bf7 commit ca7fa09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/ton-to-cw/src/tx-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export default class TonTxProcessor {
while (true) {
this.logger.info("Current processing tx hash: " + offset.hash);
// workaround. Bug of loadTransaction that causes the prev trans hash to be incomplete
if (!offset.hash)
throw new Error(
"Offset hash is undefined. Re-processing this transaction batch!"
);
if (offset.hash.length < 64) {
this.logger.error(
"TonTxProcessor queryUnprocessedTransactions offset hash length < 64: " +
Expand Down

0 comments on commit ca7fa09

Please sign in to comment.