@curvefi/api 2.71.2 → 2.71.3
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/factory/factory-api.js +1 -1
- package/lib/interfaces.d.ts +1 -0
- package/lib/prices-api.d.ts +1 -1
- package/lib/prices-api.js +3 -1
- package/package.json +1 -1
|
@@ -45,7 +45,7 @@ export const lowerCasePoolDataAddresses = (poolsData) => {
|
|
|
45
45
|
function getSwapAbiByFactoryType(factoryType, pool) {
|
|
46
46
|
var _a;
|
|
47
47
|
const isETHEnabled = pool.implementationAddress === ((_a = this.constants.CRYPTO_FACTORY_CONSTANTS.tricryptoDeployImplementations) === null || _a === void 0 ? void 0 : _a.amm_native_transfers_enabled);
|
|
48
|
-
if (factoryType === "factory-twocrypto" && isYBPool(pool.address)) {
|
|
48
|
+
if (factoryType === "factory-twocrypto" && (pool.isFxSwap || isYBPool(pool.address))) {
|
|
49
49
|
return ybTwocryptoPoolABI;
|
|
50
50
|
}
|
|
51
51
|
const map = {
|
package/lib/interfaces.d.ts
CHANGED
package/lib/prices-api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IExtendedPoolDataFromApi, IPoolType, INetworkName, IVolumeAndAPYs } from "./interfaces";
|
|
2
|
-
export type TPricesPoolType = "main" | "crypto" | "factory" | "crvusd" | "factory_crypto" | "factory_tricrypto" | "stableswapng" | "twocryptong" | null;
|
|
2
|
+
export type TPricesPoolType = "main" | "crypto" | "factory" | "crvusd" | "factory_crypto" | "factory_tricrypto" | "stableswapng" | "twocryptong" | "fxswap" | null;
|
|
3
3
|
export declare const LEGACY_POOL_TYPES: readonly IPoolType[];
|
|
4
4
|
export declare const PRICES_POOL_TYPE_TO_LEGACY: Record<NonNullable<TPricesPoolType>, IPoolType>;
|
|
5
5
|
export interface IPricesGauge {
|
package/lib/prices-api.js
CHANGED
|
@@ -27,6 +27,7 @@ export const PRICES_POOL_TYPE_TO_LEGACY = {
|
|
|
27
27
|
factory_tricrypto: "factory-tricrypto",
|
|
28
28
|
stableswapng: "factory-stable-ng",
|
|
29
29
|
twocryptong: "factory-twocrypto",
|
|
30
|
+
fxswap: "factory-twocrypto",
|
|
30
31
|
};
|
|
31
32
|
function fetchJson(url) {
|
|
32
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -89,6 +90,7 @@ const adaptPoolFromPricesApi = (pool, gaugeAddressByPoolAddress) => {
|
|
|
89
90
|
totalSupply: ((_e = pool.lp_token_supply) !== null && _e !== void 0 ? _e : 0) * 1e18,
|
|
90
91
|
amplificationCoefficient: pool.amplification_coefficient != null ? String(pool.amplification_coefficient) : "0",
|
|
91
92
|
gaugeCrvApy: [null, null],
|
|
93
|
+
isFxSwap: pool.pool_type === "fxswap",
|
|
92
94
|
};
|
|
93
95
|
};
|
|
94
96
|
export const getPoolsFromPricesApi = (network, poolType) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -109,7 +111,7 @@ export const getPoolsFromPricesApi = (network, poolType) => __awaiter(void 0, vo
|
|
|
109
111
|
tvlAll: (_b = (_a = chainData.total) === null || _a === void 0 ? void 0 : _a.total_tvl) !== null && _b !== void 0 ? _b : 0,
|
|
110
112
|
};
|
|
111
113
|
});
|
|
112
|
-
const CRYPTO_POOL_TYPES = ["crypto", "factory_crypto", "factory_tricrypto", "twocryptong"];
|
|
114
|
+
const CRYPTO_POOL_TYPES = ["crypto", "factory_crypto", "factory_tricrypto", "twocryptong", "fxswap"];
|
|
113
115
|
export const getVolumesFromPricesApi = (network) => __awaiter(void 0, void 0, void 0, function* () {
|
|
114
116
|
const chainData = yield _getPricesChainData(network);
|
|
115
117
|
if (!(chainData === null || chainData === void 0 ? void 0 : chainData.data))
|