mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Merge pull request #1854 from oceanprotocol/checks-nft-tx
Added additional check for NFT tx.
This commit is contained in:
commit
aeae593335
@ -82,11 +82,17 @@ export class NftFactory extends SmartContractWithAddress {
|
|||||||
nftData.transferable,
|
nftData.transferable,
|
||||||
nftData.owner
|
nftData.owner
|
||||||
)
|
)
|
||||||
|
if (!tx) {
|
||||||
|
const e =
|
||||||
|
'Tx for deploying new NFT contract does not exist or status is not successful.'
|
||||||
|
console.error(e)
|
||||||
|
throw e
|
||||||
|
}
|
||||||
const trxReceipt = await tx.wait()
|
const trxReceipt = await tx.wait()
|
||||||
const events = getEventFromTx(trxReceipt, 'NFTCreated')
|
const events = getEventFromTx(trxReceipt, 'NFTCreated')
|
||||||
return events.args[0]
|
return events.args[0]
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`Creation of AccessList failed: ${e}`)
|
console.error(`Creation of NFT failed: ${e}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user