File tree 3 files changed +4
-7
lines changed
3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ async function main() {
37
37
? txnData . mintData . response
38
38
: txnData . updateData . response ;
39
39
const err =
40
- dir === "minted" ? txnData . mintData . error : txnData . updateData . error ;
40
+ ( dir === "minted" ? txnData . mintData . error : txnData . updateData . error ) || null ;
41
41
const verified =
42
42
dir === "minted"
43
43
? txnData . mintData . transaction_verified
Original file line number Diff line number Diff line change @@ -61,10 +61,7 @@ async function main() {
61
61
const mintedFile = fs . readFileSync ( mintFile ) ;
62
62
if ( mintedFile . length > 0 ) {
63
63
const mintedMeta = JSON . parse ( mintedFile ) ;
64
- if (
65
- mintedMeta . mintData . response !== "OK" ||
66
- mintedMeta . mintData . error !== null
67
- ) {
64
+ if ( mintedMeta . mintData . response !== "OK" ) {
68
65
console . log (
69
66
`Response: ${ mintedMeta . mintData . response } ` ,
70
67
`Error: ${ mintedMeta . mintData . error } ` ,
@@ -128,7 +125,7 @@ async function main() {
128
125
JSON . stringify ( combinedData , null , 2 )
129
126
) ;
130
127
131
- if ( mintData . response !== "OK" || mintData . error !== null ) {
128
+ if ( mintData . response !== "OK" ) {
132
129
console . log (
133
130
`Minting ${ meta . name } failed :(` ,
134
131
`Response: ${ mintData . response } ` ,
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ async function reveal() {
84
84
const revealedFile = fs . readFileSync ( revealedFilePath ) ;
85
85
if ( revealedFile . length > 0 ) {
86
86
const revealedFileJson = JSON . parse ( revealedFile ) ;
87
- if ( revealedFileJson . updateData . response !== "OK" || revealedFileJson . updateData . error !== null ) {
87
+ if ( revealedFileJson . updateData . response !== "OK" ) {
88
88
throw "not revealed" ;
89
89
} else if ( revealedFileJson . updateData . transaction_verified === true ) {
90
90
console . log ( `${ meta . name } already revealed.` ) ;
You can’t perform that action at this time.
0 commit comments