@curvefi/api 2.65.17 → 2.65.18
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.d.ts +1 -1
- package/lib/external-api.js +13 -14
- package/lib/interfaces.d.ts +1 -0
- package/package.json +1 -1
package/lib/external-api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import memoize from "memoizee";
|
|
2
|
-
import {
|
|
2
|
+
import { ICurveLiteNetwork, IDaoProposal, IDaoProposalListItem, IDict, IExtendedPoolDataFromApi, IGaugesDataFromApi, INetworkName, IPoolType, IVolumeAndAPYs } from "./interfaces";
|
|
3
3
|
export declare const _getPoolsFromApi: ((network: INetworkName, poolType: IPoolType, isLiteChain?: any) => Promise<IExtendedPoolDataFromApi>) & memoize.Memoized<(network: INetworkName, poolType: IPoolType, isLiteChain?: any) => Promise<IExtendedPoolDataFromApi>>;
|
|
4
4
|
export declare const _getAllPoolsFromApi: (network: INetworkName, isLiteChain?: boolean) => Promise<IExtendedPoolDataFromApi[]>;
|
|
5
5
|
export declare const _getSubgraphData: ((network: INetworkName) => Promise<IVolumeAndAPYs>) & memoize.Memoized<(network: INetworkName) => Promise<IVolumeAndAPYs>>;
|
package/lib/external-api.js
CHANGED
|
@@ -244,22 +244,21 @@ export const _getCurveLiteNetworks = memoize(() => __awaiter(void 0, void 0, voi
|
|
|
244
244
|
return [];
|
|
245
245
|
}
|
|
246
246
|
const { platforms, platformsMetadata } = response.data.data;
|
|
247
|
-
|
|
248
|
-
.map((
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
247
|
+
return Object.keys(platforms)
|
|
248
|
+
.map((id) => {
|
|
249
|
+
var _a;
|
|
250
|
+
const { name, rpcUrl, nativeCurrencySymbol, explorerBaseUrl, isMainnet, chainId } = (_a = platformsMetadata[id]) !== null && _a !== void 0 ? _a : {};
|
|
251
|
+
return name && {
|
|
252
|
+
id,
|
|
253
|
+
name,
|
|
254
|
+
rpcUrl,
|
|
255
|
+
chainId,
|
|
256
|
+
explorerUrl: explorerBaseUrl,
|
|
257
|
+
nativeCurrencySymbol,
|
|
258
|
+
isTestnet: !isMainnet,
|
|
259
259
|
};
|
|
260
260
|
})
|
|
261
|
-
.filter(
|
|
262
|
-
return networks;
|
|
261
|
+
.filter(Boolean);
|
|
263
262
|
}), {
|
|
264
263
|
promise: true,
|
|
265
264
|
maxAge: 5 * 60 * 1000, // 5 minutes
|
package/lib/interfaces.d.ts
CHANGED