Skip to content

Commit

Permalink
Merge pull request #413 from reservoirprotocol/fix/use-requests-query
Browse files Browse the repository at this point in the history
Fix/use requests query
  • Loading branch information
pedromcunha authored Dec 20, 2024
2 parents 6aa5c8e + 91e7d85 commit 4216960
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nasty-teachers-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@reservoir0x/relay-kit-hooks': patch
---

Fix useRequests base url
3 changes: 2 additions & 1 deletion packages/hooks/src/hooks/useRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export const queryRequests = function (
options?: UserTransactionQuery | false,
pageParam?: string | null
): Promise<UserTransactionsResponse> {
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 }
Expand Down

0 comments on commit 4216960

Please sign in to comment.