Skip to content

Commit

Permalink
Merge pull request #280 from curvefi/fix/fixed-getPoolList
Browse files Browse the repository at this point in the history
fix: fixed fetch methods for twocrypto
  • Loading branch information
fedorovdg authored Feb 29, 2024
2 parents 7480b3a + 3f89aa4 commit bff028b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curvefi/api",
"version": "2.55.2",
"version": "2.55.3",
"description": "JavaScript library for curve.fi",
"main": "lib/index.js",
"author": "Macket",
Expand Down
8 changes: 4 additions & 4 deletions src/curve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ class Curve implements ICurve {
}

fetchTricryptoFactoryPools = async (useApi = true): Promise<void> => {
if ([324, 1284].includes(this.chainId)) return;
if (![1, 56, 137, 250, 8453].includes(this.chainId)) return;

if (useApi) {
this.constants.TRICRYPTO_FACTORY_POOLS_DATA = lowerCasePoolDataAddresses(await getFactoryPoolsDataFromApi.call(this, "factory-tricrypto"));
Expand Down Expand Up @@ -868,7 +868,7 @@ class Curve implements ICurve {
}

fetchNewTricryptoFactoryPools = async (): Promise<string[]> => {
if ([324, 1284].includes(this.chainId)) return [];
if (![1, 56, 137, 250, 8453].includes(this.chainId)) return [];

const currentPoolIds = Object.keys(this.constants.TRICRYPTO_FACTORY_POOLS_DATA);
const lastPoolIdx = currentPoolIds.length === 0 ? -1 : Number(currentPoolIds[currentPoolIds.length - 1].split("-")[2]);
Expand Down Expand Up @@ -909,7 +909,7 @@ class Curve implements ICurve {
}

fetchRecentlyDeployedTwocryptoFactoryPool = async (poolAddress: string): Promise<string> => {
if (![1, 56, 137, 250, 8453].includes(this.chainId)) return '';
if ([324, 1284].includes(this.chainId)) return '';
const poolData = lowerCasePoolDataAddresses(await getTwocryptoFactoryPoolData.call(this, 0, poolAddress));
this.constants.TWOCRYPTO_FACTORY_POOLS_DATA = { ...this.constants.TWOCRYPTO_FACTORY_POOLS_DATA, ...poolData };
this._updateDecimalsAndGauges(this.constants.TWOCRYPTO_FACTORY_POOLS_DATA);
Expand All @@ -918,7 +918,7 @@ class Curve implements ICurve {
}

fetchRecentlyDeployedTricryptoFactoryPool = async (poolAddress: string): Promise<string> => {
if ([324, 1284].includes(this.chainId)) return '';
if (![1, 56, 137, 250, 8453].includes(this.chainId)) return '';
const poolData = lowerCasePoolDataAddresses(await getTricryptoFactoryPoolData.call(this, 0, poolAddress));
this.constants.TRICRYPTO_FACTORY_POOLS_DATA = { ...this.constants.TRICRYPTO_FACTORY_POOLS_DATA, ...poolData };
this._updateDecimalsAndGauges(this.constants.TRICRYPTO_FACTORY_POOLS_DATA);
Expand Down

0 comments on commit bff028b

Please sign in to comment.