@curvefi/api 2.66.22 → 2.66.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/external-api.js +3 -3
- package/package.json +1 -1
package/lib/external-api.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import memoize from "memoizee";
|
|
11
11
|
export const _getPoolsFromApi = memoize((network_1, poolType_1, ...args_1) => __awaiter(void 0, [network_1, poolType_1, ...args_1], void 0, function* (network, poolType, isLiteChain = false) {
|
|
12
12
|
var _a;
|
|
13
|
-
const api = isLiteChain ? "https://
|
|
13
|
+
const api = isLiteChain ? "https://api-core.curve.finance/v1/" : "https://api.curve.finance/api";
|
|
14
14
|
const url = `${api}/getPools/${network}/${poolType}`;
|
|
15
15
|
return (_a = yield fetchData(url)) !== null && _a !== void 0 ? _a : { poolData: [], tvl: 0, tvlAll: 0 };
|
|
16
16
|
}), {
|
|
@@ -147,7 +147,7 @@ export const _getDaoProposal = memoize((type, id) => fetchJson(`https://api-py.l
|
|
|
147
147
|
export const _getLiteNetworksData = memoize((networkName) => __awaiter(void 0, void 0, void 0, function* () {
|
|
148
148
|
var _a, _b;
|
|
149
149
|
try {
|
|
150
|
-
const url = `https://
|
|
150
|
+
const url = `https://api-core.curve.finance/v1/getDeployment/${networkName}`;
|
|
151
151
|
const response = yield fetch(url);
|
|
152
152
|
const { data } = (_a = yield response.json()) !== null && _a !== void 0 ? _a : {};
|
|
153
153
|
if (response.status !== 200 || !data) {
|
|
@@ -195,7 +195,7 @@ export const _getLiteNetworksData = memoize((networkName) => __awaiter(void 0, v
|
|
|
195
195
|
});
|
|
196
196
|
export const _getCurveLiteNetworks = memoize(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
197
197
|
var _a;
|
|
198
|
-
const response = yield fetch(`https://
|
|
198
|
+
const response = yield fetch(`https://api-core.curve.finance/v1/getPlatforms`);
|
|
199
199
|
const { data } = (_a = yield response.json()) !== null && _a !== void 0 ? _a : {};
|
|
200
200
|
if (response.status !== 200 || !(data === null || data === void 0 ? void 0 : data.platforms)) {
|
|
201
201
|
console.error('Failed to fetch Curve platforms:', response);
|