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 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 }