From 45c189e8cc9ec41e2d7903dd6ae699d4e963b10a Mon Sep 17 00:00:00 2001 From: eli-d <64763513+eli-d@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:37:43 +0930 Subject: [PATCH] Display airdrop days remaining without connected wallet (#2616) allow airdrop query to run without address to correctly show days remaining --- .../app/routes/$network/dashboard/airdrop/index.tsx | 4 +--- .../app/routes/$network/query/dashboard/airdrop.tsx | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/web/app.fluidity.money/app/routes/$network/dashboard/airdrop/index.tsx b/web/app.fluidity.money/app/routes/$network/dashboard/airdrop/index.tsx index 967fdc3c8..40302f960 100644 --- a/web/app.fluidity.money/app/routes/$network/dashboard/airdrop/index.tsx +++ b/web/app.fluidity.money/app/routes/$network/dashboard/airdrop/index.tsx @@ -505,9 +505,7 @@ const Airdrop = () => { const isMobile = width < mobileBreakpoint; const { data: airdropData } = useCache( - address - ? `/${network}/query/dashboard/airdrop?address=${address}&epoch=${EPOCH_CURRENT_IDENTIFIER}` - : "" + `/${network}/query/dashboard/airdrop?epoch=${EPOCH_CURRENT_IDENTIFIER}&address=${address}` ); const currentApplication = ""; diff --git a/web/app.fluidity.money/app/routes/$network/query/dashboard/airdrop.tsx b/web/app.fluidity.money/app/routes/$network/query/dashboard/airdrop.tsx index 5a0685b79..a1793713f 100644 --- a/web/app.fluidity.money/app/routes/$network/query/dashboard/airdrop.tsx +++ b/web/app.fluidity.money/app/routes/$network/query/dashboard/airdrop.tsx @@ -51,12 +51,12 @@ export const loader: LoaderFunction = async ({ params, request }) => { const { network } = params; const url = new URL(request.url); - const address_ = url.searchParams.get("address"); + const address_ = url.searchParams.get("address") ?? ""; const epochIdentifier = url.searchParams.get("epoch") ?? ""; const address = address_?.toLowerCase(); - if (!address || !network || !epochIdentifier) + if (!network || !epochIdentifier) throw new Error("Invalid Request"); const { data, errors } = await useLootboxConfig({