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:
parent
6c1bfcbfd9
commit
56e6dc688e
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user