mirror of
https://github.com/oceanprotocol/react.git
synced 2025-02-14 21:10:38 +01:00
price calculation
This commit is contained in:
parent
d64ec0617e
commit
8db94b50da
@ -16,13 +16,6 @@ function App() {
|
|||||||
factoryAddress: '0x2fC1fd21cb222Dc180Ef817dE4c426fd9230b5A5'
|
factoryAddress: '0x2fC1fd21cb222Dc180Ef817dE4c426fd9230b5A5'
|
||||||
} as Config
|
} as Config
|
||||||
|
|
||||||
// const configRinkeby = {
|
|
||||||
// metadataStoreUri: 'https://aquarius.rinkeby.v3.dev-ocean.com',
|
|
||||||
// providerUri: 'https://provider.rinkeby.v3.dev-ocean.com',
|
|
||||||
// nodeUri: `https://rinkeby.infura.io/a983b53583044593956054de049922fd`,
|
|
||||||
// factoryAddress: '0xcDfEe5D80041224cDCe9AE2334E85B3236385EA3',
|
|
||||||
// oceanTokenAddress: '0x8967BCF84170c91B0d24D4302C2376283b0B3a07',
|
|
||||||
// } as Config
|
|
||||||
|
|
||||||
const configRinkeby = new ConfigHelper().getConfig('rinkeby')
|
const configRinkeby = new ConfigHelper().getConfig('rinkeby')
|
||||||
const init = async () => {}
|
const init = async () => {}
|
||||||
|
@ -53,7 +53,12 @@ function useConsume(): UseConsume {
|
|||||||
|
|
||||||
return { poolAddress:cheapestPoolAddress, poolPrice: cheapestPoolPrice.toString()}
|
return { poolAddress:cheapestPoolAddress, poolPrice: cheapestPoolPrice.toString()}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getBestDataTokenPrice(dataTokenAddress:string): Promise<string>{
|
||||||
|
const bestPool = await getCheapestPool(dataTokenAddress)
|
||||||
|
|
||||||
|
return bestPool.poolPrice
|
||||||
}
|
}
|
||||||
async function consume(
|
async function consume(
|
||||||
did: string,
|
did: string,
|
||||||
|
0
src/utils/priceUtils.ts
Normal file
0
src/utils/priceUtils.ts
Normal file
Loading…
x
Reference in New Issue
Block a user