Skip to content

Commit 7da9b4f

Browse files
authored
Fix prices API tests (alchemyplatform#516)
1 parent 89c4881 commit 7da9b4f

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

src/internal/prices-api.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import { AlchemyApiType } from '../util/const';
1313
import { nullsToUndefined } from '../util/util';
1414
import { requestHttpWithBackoff } from './dispatch';
1515

16-
const PRICES_BASE_URL = 'https://api.g.alchemy.com/prices/v1/alch-demo';
17-
1816
export async function getTokenPriceByAddress(
1917
config: AlchemyConfig,
2018
addresses: TokenAddressRequest[],
@@ -31,8 +29,7 @@ export async function getTokenPriceByAddress(
3129
{},
3230
{
3331
method: 'POST',
34-
data: { addresses },
35-
baseURL: PRICES_BASE_URL
32+
data: { addresses }
3633
}
3734
);
3835
return nullsToUndefined<GetTokenPriceByAddressResponse>(response);
@@ -97,8 +94,7 @@ export async function getHistoricalPriceBySymbol(
9794
startTime,
9895
endTime,
9996
interval
100-
},
101-
baseURL: PRICES_BASE_URL
97+
}
10298
}
10399
);
104100
return nullsToUndefined<HistoricalPriceBySymbolResponse>(response);
@@ -130,8 +126,7 @@ export async function getHistoricalPriceByAddress(
130126
startTime,
131127
endTime,
132128
interval
133-
},
134-
baseURL: PRICES_BASE_URL
129+
}
135130
}
136131
);
137132
return nullsToUndefined<HistoricalPriceByAddressResponse>(response);

test/integration/prices.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe('Prices API Integration Tests', () => {
6363
const addresses: TokenAddressRequest[] = [
6464
{
6565
network: Network.ETH_MAINNET,
66-
address: '0x0000000000000000000000000000000000000000'
66+
address: '0x00000000000000000000000000000000000000xyz'
6767
}
6868
];
6969

0 commit comments

Comments
 (0)