Skip to content

Commit

Permalink
fix: Use sign fetch factory (#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzavalia authored Mar 11, 2024
1 parent e0d4d1f commit de380a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/BaseClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import signedFetch, { type AuthIdentity, type SignedRequestInit } from 'decentraland-crypto-fetch'
import { signedFetchFactory, type AuthIdentity, type SignedRequestInit } from 'decentraland-crypto-fetch'
import * as nodeURL from 'url'
import { ClientError } from './ClientError'

Expand Down Expand Up @@ -46,6 +46,7 @@ export abstract class BaseClient {
protected rawFetch = (path: string, init?: SignedRequestInit): Promise<Response> => {
const fullUrl = new URL(path, this.baseUrl)
const identity = init?.identity ?? this.getIdentity()
const signedFetch = signedFetchFactory()
return signedFetch(fullUrl.toString(), { ...init, identity })
}

Expand Down

0 comments on commit de380a8

Please sign in to comment.