mirror of
https://github.com/oceanprotocol/react.git
synced 2024-11-25 20:01:30 +01:00
fix price calculation
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
parent
378b5deae3
commit
1bc580bf9b
@ -24,8 +24,8 @@ export async function getCheapestPoolPrice(
|
||||
for (let i = 0; i < tokenPools.length; i++) {
|
||||
const poolPrice = await ocean.pool.calcInGivenOut(
|
||||
tokenPools[i],
|
||||
dataTokenAddress,
|
||||
ocean.pool.oceanAddress,
|
||||
dataTokenAddress,
|
||||
'1'
|
||||
)
|
||||
const decimalPoolPrice = new Decimal(poolPrice)
|
||||
@ -186,8 +186,8 @@ export async function getFirstPoolPrice(
|
||||
|
||||
const firstPoolPrice = await ocean.pool.calcInGivenOut(
|
||||
firstPoolAddress,
|
||||
dataTokenAddress,
|
||||
ocean.pool.oceanAddress,
|
||||
dataTokenAddress,
|
||||
'1'
|
||||
)
|
||||
const usePrice = await ocean.pool.getOceanNeeded(firstPoolAddress, '1')
|
||||
|
Loading…
Reference in New Issue
Block a user