From fc3759e97fdbd51cba05ed7a28d4397991526211 Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Tue, 28 Nov 2023 10:47:28 -0800 Subject: [PATCH] fix(gql): fix query param to allow 0 to be provided as blockHeight --- src/api/graphql.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/graphql.ts b/src/api/graphql.ts index 45773dc..3e70459 100644 --- a/src/api/graphql.ts +++ b/src/api/graphql.ts @@ -123,9 +123,10 @@ export async function getWalletInteractionsForContract( >(); do { const ownerFilter = address ? `owners: ["${address}"]` : ''; - const blockHeightFilter = blockHeight - ? `block: { min: 0 max: ${blockHeight} }` - : ''; + const blockHeightFilter = + blockHeight !== null && blockHeight !== undefined + ? `block: { min: 0 max: ${blockHeight} }` + : ''; const queryObject = { query: `