Skip to content

Commit

Permalink
Missing append slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sluder committed Nov 15, 2023
1 parent 879920f commit 0d12d5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/providers/asset-metadata/token-registry-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import axios, { AxiosInstance } from 'axios';
import { AssetMetadata, RequestConfig } from '@app/types';
import { Asset } from '@dex/models/asset';
import { BaseMetadataProvider } from './base-metadata-provider';
import { appendSlash } from '@app/utils';

export class TokenRegistryProvider extends BaseMetadataProvider {

Expand All @@ -18,7 +19,7 @@ export class TokenRegistryProvider extends BaseMetadataProvider {

this._api = axios.create({
timeout: requestConfig.timeout ?? 5000,
baseURL: `${requestConfig.proxyUrl ?? ''}https://tokens.cardano.org/`,
baseURL: `${appendSlash(requestConfig.proxyUrl)}https://tokens.cardano.org/`,
headers: {
'Content-Type': 'application/json',
},
Expand Down
3 changes: 2 additions & 1 deletion src/providers/data/blockfrost-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from '@app/types';
import { Asset } from '@dex/models/asset';
import Bottleneck from 'bottleneck';
import { appendSlash } from '@app/utils';

const API_BURST_SIZE: number = 500;
const API_COOLDOWN_SIZE: number = 10;
Expand Down Expand Up @@ -38,7 +39,7 @@ export class BlockfrostProvider extends BaseDataProvider {
);

this._api = axios.create({
baseURL: (this._requestConfig.proxyUrl ?? '') + config.url,
baseURL: (appendSlash(requestConfig.proxyUrl)) + config.url,
timeout: this._requestConfig.timeout,
headers: {
'Content-Type': 'application/json',
Expand Down
3 changes: 2 additions & 1 deletion src/providers/data/kupo-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from '@app/types';
import axios, { AxiosInstance } from 'axios';
import { Data } from 'lucid-cardano';
import { appendSlash } from '@app/utils';

export class KupoProvider extends BaseDataProvider {

Expand All @@ -35,7 +36,7 @@ export class KupoProvider extends BaseDataProvider {

this._config = config;
this._kupoApi = axios.create({
baseURL: this._requestConfig.proxyUrl + config.url,
baseURL: appendSlash(requestConfig.proxyUrl) + config.url,
timeout: this._requestConfig.timeout,
headers: {
'Content-Type': 'application/json',
Expand Down

0 comments on commit 0d12d5f

Please sign in to comment.