[Blockchain Watcher] (FIX - ALGORAND) Validate method and payload in algorand redeem event (#1514)

Validate method and payload

Co-authored-by: julian merlo <julianmerlo@julians-MacBook-Pro-2.local>
This commit is contained in:
Julian 2024-06-27 11:25:56 -03:00 committed by GitHub
parent 3135276c2c
commit 5eec936372
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,9 @@ export const algorandRedeemedTransactionFoundMapper = (
applicationAddress: string;
}[]
): TransactionFoundEvent | undefined => {
if (!transaction.method || !transaction.payload) {
return undefined;
}
const method = Buffer.from(transaction.method, "base64").toString("utf8");
const applicationId = String(transaction.applicationId);