diff --git a/utils/nftport/checkTxns.js b/utils/nftport/checkTxns.js index 308d4eb6..b1213585 100644 --- a/utils/nftport/checkTxns.js +++ b/utils/nftport/checkTxns.js @@ -37,7 +37,7 @@ async function main() { ? txnData.mintData.response : txnData.updateData.response; const err = - dir === "minted" ? txnData.mintData.error : txnData.updateData.error; + (dir === "minted" ? txnData.mintData.error : txnData.updateData.error) || null; const verified = dir === "minted" ? txnData.mintData.transaction_verified diff --git a/utils/nftport/mint.js b/utils/nftport/mint.js index af2fe287..5cbd0550 100644 --- a/utils/nftport/mint.js +++ b/utils/nftport/mint.js @@ -61,10 +61,7 @@ async function main() { const mintedFile = fs.readFileSync(mintFile); if (mintedFile.length > 0) { const mintedMeta = JSON.parse(mintedFile); - if ( - mintedMeta.mintData.response !== "OK" || - mintedMeta.mintData.error !== null - ) { + if (mintedMeta.mintData.response !== "OK") { console.log( `Response: ${mintedMeta.mintData.response}`, `Error: ${mintedMeta.mintData.error}`, @@ -128,7 +125,7 @@ async function main() { JSON.stringify(combinedData, null, 2) ); - if (mintData.response !== "OK" || mintData.error !== null) { + if (mintData.response !== "OK") { console.log( `Minting ${meta.name} failed :(`, `Response: ${mintData.response}`, diff --git a/utils/nftport/revealNFTs.js b/utils/nftport/revealNFTs.js index 769c4383..76bc8685 100644 --- a/utils/nftport/revealNFTs.js +++ b/utils/nftport/revealNFTs.js @@ -84,7 +84,7 @@ async function reveal() { const revealedFile = fs.readFileSync(revealedFilePath); if (revealedFile.length > 0) { const revealedFileJson = JSON.parse(revealedFile); - if (revealedFileJson.updateData.response !== "OK" || revealedFileJson.updateData.error !== null) { + if (revealedFileJson.updateData.response !== "OK") { throw "not revealed"; } else if(revealedFileJson.updateData.transaction_verified === true) { console.log(`${meta.name} already revealed.`);