mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-16 02:04:54 +01:00
[Free Pricing] Check minterApproved before cancelMinter() (#836)
* Check `minterApproved` before cancelMinter * Feedback change * Update freePrice.ts Co-authored-by: KRIS LIEW <iforte.intellege.liew@daimler.com> Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
This commit is contained in:
parent
0698c26440
commit
d1206c291b
@ -8,6 +8,9 @@ export async function setMinterToPublisher(
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user