Skip to content

Commit

Permalink
impr: set "invalid_string" as payment_reference when parsing fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ps1dr3x committed Jan 24, 2025
1 parent f492252 commit 2c4a028
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parsers/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ export const parse = (chainId: string, e: IEvent) => {
try {
payment_reference = escrow?.[position.PAYMENT_REFERENCE];
} catch (err) {
payment_reference = "invalid_string";
logger.error(
`[${chainId}] Ignoring invalid payment_reference string in event: ${e.fragment.name} tx: ${transaction_hash}`,
`[${chainId}] Failed to parse invalid payment_reference string in event: ${e.fragment.name} tx: ${transaction_hash}`,
);
}

Expand Down

0 comments on commit 2c4a028

Please sign in to comment.