Skip to content

Commit bb4581e

Browse files
committed
added comment on line 4
1 parent 604296e commit bb4581e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

utils/nftport/mint.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@ async function main() {
2020

2121
for (const meta of ipfsMetas) {
2222
const mintFile = `${basePath}/build/minted/${meta.custom_fields.edition}.json`;
23-
23+
2424
try {
2525
fs.accessSync(mintFile);
26+
const mintedFile = fs.readFileSync(mintFile)
27+
if(mintedFile.length > 0) {
28+
const mintedMeta = JSON.parse(mintedFile)
29+
if(mintedMeta.mintData.response !== "OK") throw 'not minted'
30+
}
2631
console.log(`${meta.name} already minted`);
2732
} catch(err) {
2833
try {

utils/nftport/uploadMetas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const fetch = require("node-fetch");
22
const basePath = process.cwd();
33
const fs = require("fs");
4-
const readDir = `${basePath}/build/json`;
4+
const readDir = `${basePath}/build/json`; // change this directory if you are uploading generic images first in order to do a reveal.
55

66
const AUTH = 'YOUR API KEY HERE';
77
const TIMEOUT = 1000; // Milliseconds. Extend this if needed to wait for each upload. 1000 = 1 second.

0 commit comments

Comments
 (0)