@curvefi/api 2.70.1 → 2.70.2
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/utils.js +5 -0
- package/package.json +1 -1
package/lib/utils.js
CHANGED
|
@@ -348,6 +348,11 @@ export function _getUsdRate(assetId) {
|
|
|
348
348
|
if (this.chainId === ARC_CHAIN_ID && (this.isEth(assetId) ||
|
|
349
349
|
assetId.toLowerCase() === this.constants.NATIVE_TOKEN.wrappedAddress.toLowerCase()))
|
|
350
350
|
return 1;
|
|
351
|
+
if (this.isEth(assetId)) {
|
|
352
|
+
const wrappedPrice = pricesFromApi[this.constants.NATIVE_TOKEN.wrappedAddress.toLowerCase()];
|
|
353
|
+
if (wrappedPrice)
|
|
354
|
+
return wrappedPrice;
|
|
355
|
+
}
|
|
351
356
|
let chainName = this.isLiteChain ? yield this.constants.NETWORK_NAME : {
|
|
352
357
|
1: 'ethereum',
|
|
353
358
|
10: 'optimistic-ethereum',
|