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
|
||||
) {
|
||||
if (!ocean || !dataTokenAddress) return
|
||||
|
||||
try {
|
||||
const tokenExchanges = await ocean.fixedRateExchange.searchforDT(
|
||||
dataTokenAddress,
|
||||
'1'
|
||||
@ -112,6 +112,13 @@ export async function getCheapestExchange(
|
||||
address: cheapestExchangeAddress,
|
||||
price: cheapestExchangePrice.toString()
|
||||
}
|
||||
} catch (err) {
|
||||
Logger.log(err)
|
||||
return {
|
||||
address: '',
|
||||
price: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function checkAndBuyDT(
|
||||
|
Loading…
x
Reference in New Issue
Block a user