From 348b3a237df5147e0d9eec52c12d2b7c8800ad5f Mon Sep 17 00:00:00 2001 From: Alexandre ABRIOUX Date: Mon, 27 Nov 2023 14:54:37 +0100 Subject: [PATCH 1/2] fix(payment-detection): blockFilter should not be empty --- .../src/thegraph/conversion-info-retriever.ts | 4 ++-- packages/payment-detection/src/thegraph/info-retriever.ts | 4 ++-- .../thegraph/queries/GetPaymentsAndEscrowState.graphql | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/payment-detection/src/thegraph/conversion-info-retriever.ts b/packages/payment-detection/src/thegraph/conversion-info-retriever.ts index 6cdfce726b..10338281c4 100644 --- a/packages/payment-detection/src/thegraph/conversion-info-retriever.ts +++ b/packages/payment-detection/src/thegraph/conversion-info-retriever.ts @@ -24,7 +24,7 @@ export class TheGraphConversionInfoRetriever extends TheGraphInfoRetriever Date: Mon, 27 Nov 2023 16:49:12 +0100 Subject: [PATCH 2/2] use zero as default --- .../src/thegraph/conversion-info-retriever.ts | 8 ++------ packages/payment-detection/src/thegraph/info-retriever.ts | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/payment-detection/src/thegraph/conversion-info-retriever.ts b/packages/payment-detection/src/thegraph/conversion-info-retriever.ts index 10338281c4..cede1c6335 100644 --- a/packages/payment-detection/src/thegraph/conversion-info-retriever.ts +++ b/packages/payment-detection/src/thegraph/conversion-info-retriever.ts @@ -22,9 +22,7 @@ export class TheGraphConversionInfoRetriever extends TheGraphInfoRetriever> { const { payments } = params.acceptedTokens ? await this.client.GetAnyToFungiblePayments({ - blockFilter: this.client.options?.minIndexedBlock - ? { number_gte: this.client.options.minIndexedBlock } - : {}, + blockFilter: { number_gte: this.client.options?.minIndexedBlock || 0 }, reference: utils.keccak256(`0x${params.paymentReference}`), to: params.toAddress.toLowerCase(), currency: params.requestCurrency.hash.toLowerCase(), @@ -32,9 +30,7 @@ export class TheGraphConversionInfoRetriever extends TheGraphInfoRetriever