Skip to content

Commit

Permalink
fix: parse renown base url
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldas authored and froid1911 committed Aug 14, 2024
1 parent 260441d commit 160b4df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/services/renown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ export class Renown {
if (!this.#baseUrl) {
throw new Error('RENOWN_URL is not set');
}

const response = await fetch(
`${this.#baseUrl}/api/auth/credential?address=${encodeURIComponent(address)}&chainId=${encodeURIComponent(chainId)}&connectId=${encodeURIComponent(connectId)}`,
{
method: 'GET',
},
const url = new URL(
`/api/auth/credential?address=${encodeURIComponent(address)}&chainId=${encodeURIComponent(chainId)}&connectId=${encodeURIComponent(connectId)}`,
this.#baseUrl,
);
const response = await fetch(url, {
method: 'GET',
});
if (response.ok) {
const result = (await response.json()) as {
credential: PowerhouseVerifiableCredential;
Expand Down

0 comments on commit 160b4df

Please sign in to comment.