Skip to content

Commit

Permalink
fix: fix nativeToken price for corn
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorovdg committed Dec 31, 2024
1 parent 29fd498 commit bb87a0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,11 @@ export const _getUsdRate = async (assetId: string): Promise<number> => {
}

if (nativeTokenName === undefined) {
throw Error('nativeTokenName not found')
if(curve.isLiteChain && curve.constants.API_CONSTANTS?.wrappedNativeTokenAddress.toLowerCase() && curve.constants.API_CONSTANTS?.wrappedNativeTokenAddress.toLowerCase() in pricesFromApi) {
return pricesFromApi[curve.constants.API_CONSTANTS?.wrappedNativeTokenAddress.toLowerCase()];
} else {
throw Error('nativeTokenName not found')
}
}

assetId = {
Expand Down

0 comments on commit bb87a0e

Please sign in to comment.