1
0
mirror of https://github.com/oceanprotocol/react.git synced 2024-12-23 17:54:03 +01:00

correct price when no pools

This commit is contained in:
mihaisc 2020-08-06 12:13:17 +03:00
parent 6c1bfcbfd9
commit 56e6dc688e

View File

@ -13,7 +13,7 @@ export async function getCheapestPool(
if (tokenPools === undefined || tokenPools.length === 0) {
return {
poolAddress: '',
poolPrice: '0'
poolPrice: ''
}
}
let cheapestPoolAddress
@ -27,7 +27,7 @@ export async function getCheapestPool(
'1'
)
const decimalPoolPrice = new Decimal(poolPrice)
Logger.log('Pool price ', tokenPools[i], poolPrice)
Logger.log('Pool price ', tokenPools[i], decimalPoolPrice.toString())
if (decimalPoolPrice < cheapestPoolPrice) {
cheapestPoolPrice = decimalPoolPrice
cheapestPoolAddress = tokenPools[i]