@@ -300,14 +300,14 @@ export async function getBuyWithCryptoQuote(
300300 Number (
301301 Value . format ( quote . originAmount , firstStep . originToken . decimals ) ,
302302 ) *
303- firstStep . originToken . priceUsd *
303+ ( firstStep . originToken . prices [ "USD" ] || 0 ) *
304304 100 ,
305305 amountWei : quote . originAmount . toString ( ) ,
306306 token : {
307307 chainId : firstStep . originToken . chainId ,
308308 decimals : firstStep . originToken . decimals ,
309309 name : firstStep . originToken . name ,
310- priceUSDCents : firstStep . originToken . priceUsd * 100 ,
310+ priceUSDCents : ( firstStep . originToken . prices [ "USD" ] || 0 ) * 100 ,
311311 symbol : firstStep . originToken . symbol ,
312312 tokenAddress : firstStep . originToken . address ,
313313 } ,
@@ -323,7 +323,7 @@ export async function getBuyWithCryptoQuote(
323323 chainId : firstStep . originToken . chainId ,
324324 decimals : firstStep . originToken . decimals ,
325325 name : firstStep . originToken . name ,
326- priceUSDCents : firstStep . originToken . priceUsd * 100 ,
326+ priceUSDCents : ( firstStep . originToken . prices [ "USD" ] || 0 ) * 100 ,
327327 symbol : firstStep . originToken . symbol ,
328328 tokenAddress : firstStep . originToken . address ,
329329 } ,
@@ -337,7 +337,7 @@ export async function getBuyWithCryptoQuote(
337337 Number (
338338 Value . format ( quote . originAmount , firstStep . originToken . decimals ) ,
339339 ) *
340- firstStep . originToken . priceUsd *
340+ ( firstStep . originToken . prices [ "USD" ] || 0 ) *
341341 100 ,
342342 gasCostUSDCents : 0 ,
343343 slippageBPS : 0 ,
@@ -348,7 +348,7 @@ export async function getBuyWithCryptoQuote(
348348 firstStep . destinationToken . decimals ,
349349 ) ,
350350 ) *
351- firstStep . destinationToken . priceUsd *
351+ ( firstStep . destinationToken . prices [ "USD" ] || 0 ) *
352352 100 ,
353353 toAmountUSDCents :
354354 Number (
@@ -357,7 +357,7 @@ export async function getBuyWithCryptoQuote(
357357 firstStep . destinationToken . decimals ,
358358 ) ,
359359 ) *
360- firstStep . destinationToken . priceUsd *
360+ ( firstStep . destinationToken . prices [ "USD" ] || 0 ) *
361361 100 ,
362362 } ,
363363 fromAddress : quote . intent . sender ,
@@ -372,7 +372,7 @@ export async function getBuyWithCryptoQuote(
372372 chainId : firstStep . originToken . chainId ,
373373 decimals : firstStep . originToken . decimals ,
374374 name : firstStep . originToken . name ,
375- priceUSDCents : firstStep . originToken . priceUsd * 100 ,
375+ priceUSDCents : ( firstStep . originToken . prices [ "USD" ] || 0 ) * 100 ,
376376 symbol : firstStep . originToken . symbol ,
377377 tokenAddress : firstStep . originToken . address ,
378378 } ,
@@ -395,7 +395,7 @@ export async function getBuyWithCryptoQuote(
395395 chainId : firstStep . destinationToken . chainId ,
396396 decimals : firstStep . destinationToken . decimals ,
397397 name : firstStep . destinationToken . name ,
398- priceUSDCents : firstStep . destinationToken . priceUsd * 100 ,
398+ priceUSDCents : ( firstStep . destinationToken . prices [ "USD" ] || 0 ) * 100 ,
399399 symbol : firstStep . destinationToken . symbol ,
400400 tokenAddress : firstStep . destinationToken . address ,
401401 } ,
0 commit comments