1
0
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:
Maria Carmina 2024-09-25 23:01:23 +03:00 committed by GitHub
commit aeae593335
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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}`)
}
}