1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

Added additional check for NFT tx.

This commit is contained in:
mariacarmina 2024-09-24 16:12:45 +03:00
parent eb6d84edce
commit 1e0c75f4a2

View File

@ -82,11 +82,17 @@ export class NftFactory extends SmartContractWithAddress {
nftData.transferable,
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 events = getEventFromTx(trxReceipt, 'NFTCreated')
return events.args[0]
} catch (e) {
console.error(`Creation of AccessList failed: ${e}`)
console.error(`Creation of NFT failed: ${e}`)
}
}