mirror of
https://github.com/oceanprotocol/react.git
synced 2025-02-14 21:10:38 +01:00
small fix
This commit is contained in:
parent
73a4662bd2
commit
1db0143c46
@ -82,7 +82,7 @@ export async function getCheapestExchange(
|
|||||||
dataTokenAddress: string
|
dataTokenAddress: string
|
||||||
) {
|
) {
|
||||||
if (!ocean || !dataTokenAddress) return
|
if (!ocean || !dataTokenAddress) return
|
||||||
|
try {
|
||||||
const tokenExchanges = await ocean.fixedRateExchange.searchforDT(
|
const tokenExchanges = await ocean.fixedRateExchange.searchforDT(
|
||||||
dataTokenAddress,
|
dataTokenAddress,
|
||||||
'1'
|
'1'
|
||||||
@ -112,6 +112,13 @@ export async function getCheapestExchange(
|
|||||||
address: cheapestExchangeAddress,
|
address: cheapestExchangeAddress,
|
||||||
price: cheapestExchangePrice.toString()
|
price: cheapestExchangePrice.toString()
|
||||||
}
|
}
|
||||||
|
} catch (err) {
|
||||||
|
Logger.log(err)
|
||||||
|
return {
|
||||||
|
address: '',
|
||||||
|
price: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function checkAndBuyDT(
|
export async function checkAndBuyDT(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user