From b75b695e1b366db8125565c9979a1a9496e5f00b Mon Sep 17 00:00:00 2001 From: pedromcunha Date: Fri, 20 Dec 2024 17:33:51 -0500 Subject: [PATCH 1/2] Fix base url issue when using useRequests --- packages/hooks/src/hooks/useRequests.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/hooks/src/hooks/useRequests.ts b/packages/hooks/src/hooks/useRequests.ts index 0af65f5d..fb67888c 100644 --- a/packages/hooks/src/hooks/useRequests.ts +++ b/packages/hooks/src/hooks/useRequests.ts @@ -32,7 +32,8 @@ export const queryRequests = function ( options?: UserTransactionQuery | false, pageParam?: string | null ): Promise { - const baseUrl = typeof window !== 'undefined' ? window.location.origin : '' + const baseUrl = + typeof window !== 'undefined' ? window.location.origin : undefined const url = new URL(`${baseApiUrl}/requests/v2`, baseUrl) let query: UserTransactionQuery = { ...options } From 91e7d85142ec4c041e4a291158af012478a0c63c Mon Sep 17 00:00:00 2001 From: pedromcunha Date: Fri, 20 Dec 2024 17:34:31 -0500 Subject: [PATCH 2/2] feat: changeset --- .changeset/nasty-teachers-count.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/nasty-teachers-count.md diff --git a/.changeset/nasty-teachers-count.md b/.changeset/nasty-teachers-count.md new file mode 100644 index 00000000..43030fa8 --- /dev/null +++ b/.changeset/nasty-teachers-count.md @@ -0,0 +1,5 @@ +--- +'@reservoir0x/relay-kit-hooks': patch +--- + +Fix useRequests base url