Skip to content

Commit

Permalink
Added additional check for NFT tx.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariacarmina committed Sep 24, 2024
1 parent eb6d84e commit 1e0c75f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/contracts/NFTFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}
}

Expand Down

0 comments on commit 1e0c75f

Please sign in to comment.