diff --git a/package.json b/package.json index 4b8ec511..79df4a8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@curvefi/api", - "version": "2.65.2", + "version": "2.65.3", "description": "JavaScript library for curve.fi", "main": "lib/index.js", "author": "Macket", diff --git a/src/external-api.ts b/src/external-api.ts index 9e2435e4..380a707c 100644 --- a/src/external-api.ts +++ b/src/external-api.ts @@ -317,6 +317,7 @@ export const _getCurveLiteNetworks = memoize( rpcUrl: metadata.rpcUrl, chainId: metadata.chainId, explorerUrl: metadata.explorerBaseUrl, + nativeCurrencySymbol: metadata.nativeCurrencySymbol, }; }) .filter((network): network is ICurveLiteNetwork => network !== null); diff --git a/src/interfaces.ts b/src/interfaces.ts index a3eb4576..6bc50b51 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -288,6 +288,7 @@ export interface ICurveLiteNetwork { name: string rpcUrl: string explorerUrl: string + nativeCurrencySymbol: string } export type TVoteType = "PARAMETER" | "OWNERSHIP" diff --git a/src/utils.ts b/src/utils.ts index 65f57672..995cdb26 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -425,10 +425,6 @@ export const _getRewardsFromApi = async (): Promise> => const _usdRatesCache: IDict<{ rate: number, time: number }> = {} export const _getUsdRate = async (assetId: string): Promise => { - if(curve.isLiteChain) { - throw Error('This method is not supported for the lite version') - } - if (curve.chainId === 1 && assetId.toLowerCase() === '0x8762db106b2c2a0bccb3a80d1ed41273552616e8') return 0; // RSR const pricesFromApi = await _getUsdPricesFromApi(); if (assetId.toLowerCase() in pricesFromApi) return pricesFromApi[assetId.toLowerCase()]; @@ -515,10 +511,6 @@ export const _getUsdRate = async (assetId: string): Promise => { } export const getUsdRate = async (coin: string): Promise => { - if(curve.isLiteChain) { - throw Error('This method is not supported for the lite version') - } - const [coinAddress] = _getCoinAddressesNoCheck(coin); return await _getUsdRate(coinAddress); }