From 53dd1966decdbf8e5b8a501b9f77a2f2e764cb99 Mon Sep 17 00:00:00 2001 From: jipstavenuiter Date: Sun, 10 Mar 2024 21:48:24 -0600 Subject: [PATCH] (fix): case insensitive rpc endpoint --- hooks/useFetchHyperboardContents.ts | 2 +- ...311034403_uri_too_long_rpc_helper_fix_case_sensitivity.sql | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 supabase/migrations/20240311034403_uri_too_long_rpc_helper_fix_case_sensitivity.sql diff --git a/hooks/useFetchHyperboardContents.ts b/hooks/useFetchHyperboardContents.ts index edbff2c..c8f78c3 100644 --- a/hooks/useFetchHyperboardContents.ts +++ b/hooks/useFetchHyperboardContents.ts @@ -143,7 +143,7 @@ const processRegistryForDisplay = async ( const ownerAddresses = _.uniq([ ...fractions.map((x) => x.owner), ...allowlistResults.map((x) => x.owner), - blueprints.map((b) => b.minter_address.toLowerCase()), + ...blueprints.map((b) => b.minter_address.toLowerCase()), ]) as string[]; // Fetch display data for all owners diff --git a/supabase/migrations/20240311034403_uri_too_long_rpc_helper_fix_case_sensitivity.sql b/supabase/migrations/20240311034403_uri_too_long_rpc_helper_fix_case_sensitivity.sql new file mode 100644 index 0000000..30c0878 --- /dev/null +++ b/supabase/migrations/20240311034403_uri_too_long_rpc_helper_fix_case_sensitivity.sql @@ -0,0 +1,4 @@ +create or replace function default_sponsor_metadata_by_address(addresses text[]) returns setof default_sponsor_metadata as $$ +select * from default_sponsor_metadata +where lower(address) = any(addresses) +$$ language sql;