1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-30 05:41:41 +02:00
market/src/@utils/freePrice.ts

42 lines
1.1 KiB
TypeScript
Raw Normal View History

import { LoggerInstance } from '@oceanprotocol/lib'
2021-09-02 19:49:21 +02:00
import { TransactionReceipt } from 'web3-core'
export async function setMinterToPublisher(
dataTokenAddress: string,
accountId: string,
setError: (msg: string) => void
2021-09-02 19:49:21 +02:00
): 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
2021-09-02 19:49:21 +02:00
): 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
}