mirror of
https://github.com/oceanprotocol/react.git
synced 2024-12-24 10:06:20 +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) {
|
if (tokenPools === undefined || tokenPools.length === 0) {
|
||||||
return {
|
return {
|
||||||
poolAddress: '',
|
poolAddress: '',
|
||||||
poolPrice: '0'
|
poolPrice: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let cheapestPoolAddress
|
let cheapestPoolAddress
|
||||||
@ -27,7 +27,7 @@ export async function getCheapestPool(
|
|||||||
'1'
|
'1'
|
||||||
)
|
)
|
||||||
const decimalPoolPrice = new Decimal(poolPrice)
|
const decimalPoolPrice = new Decimal(poolPrice)
|
||||||
Logger.log('Pool price ', tokenPools[i], poolPrice)
|
Logger.log('Pool price ', tokenPools[i], decimalPoolPrice.toString())
|
||||||
if (decimalPoolPrice < cheapestPoolPrice) {
|
if (decimalPoolPrice < cheapestPoolPrice) {
|
||||||
cheapestPoolPrice = decimalPoolPrice
|
cheapestPoolPrice = decimalPoolPrice
|
||||||
cheapestPoolAddress = tokenPools[i]
|
cheapestPoolAddress = tokenPools[i]
|
||||||
|
Loading…
Reference in New Issue
Block a user