From 32da109c61758557fc61f9c2e7ee9ac09dde54d1 Mon Sep 17 00:00:00 2001 From: quinoah <37305800+quinoah@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:27:55 +0200 Subject: [PATCH] Add Omni transaction validity check --- backend/src/infrastructure/omni/OmniExplorerService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/infrastructure/omni/OmniExplorerService.ts b/backend/src/infrastructure/omni/OmniExplorerService.ts index 56693a5..f2587aa 100644 --- a/backend/src/infrastructure/omni/OmniExplorerService.ts +++ b/backend/src/infrastructure/omni/OmniExplorerService.ts @@ -59,7 +59,8 @@ export class OmniExplorerService { public filterBurnTransactionsForAddress(sendingAddress: string, transactions: OmniExplorerTransaction[]) { return transactions.filter(t => { - return t.confirmations >= parseInt(this.requiredConfirmations) && + return t.valid && + t.confirmations >= parseInt(this.requiredConfirmations) && new BigNumber(t.propertyid).isEqualTo(this.tokenPropertyId) && t.sendingaddress.trim().toLowerCase() === sendingAddress.trim().toLowerCase(); }); @@ -100,4 +101,4 @@ export class OmniExplorerService { throw error; } } -} \ No newline at end of file +}