From 79298112cdbfcebfd8f8e601a90d78677c67caa2 Mon Sep 17 00:00:00 2001 From: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com> Date: Sun, 31 Mar 2024 15:13:59 -0300 Subject: [PATCH] cardano transfer: narrow credential relation filter (#332) * cardano transfer: narrow credential relation filter * Trigger transfer primitive for any witness --------- Co-authored-by: Sebastien Guillemot --- packages/engine/paima-funnel/src/cde/cardanoTransfer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/engine/paima-funnel/src/cde/cardanoTransfer.ts b/packages/engine/paima-funnel/src/cde/cardanoTransfer.ts index 1545660c4..8fce4f54d 100644 --- a/packages/engine/paima-funnel/src/cde/cardanoTransfer.ts +++ b/packages/engine/paima-funnel/src/cde/cardanoTransfer.ts @@ -4,6 +4,7 @@ import { Routes, query } from '@dcspark/carp-client'; import type { TxAndBlockInfo } from '@dcspark/carp-client'; import { Transaction } from '@dcspark/cardano-multiplatform-lib-nodejs'; import type { BlockTxPair } from '@dcspark/carp-client'; +import { RelationFilterType } from '@dcspark/carp-client'; export default async function getCdeData( url: string, @@ -24,10 +25,12 @@ export default async function getCdeData( ): Promise { let result = [] as CdeCardanoTransferDatum[]; + const relationFilter = RelationFilterType.Output | RelationFilterType.Witness; + while (true) { const event = await timeout( query(url, Routes.transactionHistory, { - // TODO: maybe it should be Output + relationFilter, addresses: [extension.credential], slotLimits: { from: fromAbsoluteSlot,