1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-28 00:27:49 +02:00
market/src/@utils/freePrice.ts
mihaisc 4caf72d0c9
Fix/old lib dep (#959)
* fixes

* change aqua url

* update future v4 url
2021-12-10 03:33:47 -08:00

42 lines
1.1 KiB
TypeScript

import { LoggerInstance } from '@oceanprotocol/lib'
import { TransactionReceipt } from 'web3-core'
export async function setMinterToPublisher(
dataTokenAddress: string,
accountId: string,
setError: (msg: string) => void
): Promise<TransactionReceipt> {
// free pricing v3 workaround part1
// const status = await ocean.OceanDispenser.status(dataTokenAddress)
// if (!status?.minterApproved) return
// const response = await ocean.OceanDispenser.cancelMinter(
// dataTokenAddress,
// accountId
// )
// if (!response) {
// setError('Updating DDO failed.')
// LoggerInstance.error('Failed at cancelMinter')
// }
// return response
return null
}
export async function setMinterToDispenser(
dataTokenAddress: string,
accountId: string,
setError: (msg: string) => void
): Promise<TransactionReceipt> {
// free pricing v3 workaround part2
// const response = await ocean.OceanDispenser.makeMinter(
// dataTokenAddress,
// accountId
// )
// if (!response) {
// setError('Updating DDO failed.')
// LoggerInstance.error('Failed at makeMinter')
// }
// return response
return null
}