Skip to content

Commit 15c5af1

Browse files
committed
Update error handling from NFTPort
1 parent 817b375 commit 15c5af1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

backend/utils/nftport/deployContract.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const deployContract = async () => {
4141
try {
4242
let jsonFile = fs.readFileSync(`${basePath}/build/ipfsMetasGeneric/_ipfsMetasResponse.json`);
4343
let metaData = JSON.parse(jsonFile);
44-
if(metaData.response === "OK" && metaData.error === null) {
44+
if(metaData.response === "OK") {
4545
if(!PREREVEAL_TOKEN_URI) {
4646
PREREVEAL_TOKEN_URI = metaData.metadata_uri;
4747
}
@@ -57,7 +57,7 @@ const deployContract = async () => {
5757
try {
5858
let jsonFile = fs.readFileSync(`${basePath}/build/ipfsMetas/_ipfsMetasResponse.json`);
5959
let metaData = JSON.parse(jsonFile);
60-
if(metaData.response === "OK" && metaData.error === null) {
60+
if(metaData.response === "OK") {
6161
if(!BASE_URI) {
6262
BASE_URI = metaData.metadata_directory_ipfs_uri;
6363
}

backend/utils/nftport/retrieveContract.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const retrieveContract = async () => {
2727
`${basePath}/build/contract/_contract.json`,
2828
JSON.stringify(response, null, 2)
2929
);
30-
if (response.response === "OK" && response.error === null) {
30+
if (response.response === "OK") {
3131
console.log(`Contract ${CONTRACT_NAME} deployed successfully`);
3232
} else {
3333
console.log(`Contract ${CONTRACT_NAME} deployment failed`);

backend/utils/nftport/updateContract.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
`${basePath}/build/ipfsMetas/_ipfsMetasResponse.json`
103103
);
104104
let metaData = JSON.parse(jsonFile);
105-
if (metaData.response === "OK" && metaData.error === null) {
105+
if (metaData.response === "OK") {
106106
BASE_URI = metaData.metadata_directory_ipfs_uri;
107107
} else {
108108
console.log(
@@ -126,7 +126,7 @@
126126
`${basePath}/build/ipfsMetasGeneric/_ipfsMetasResponse.json`
127127
);
128128
let metaData = JSON.parse(jsonFile);
129-
if (metaData.response === "OK" && metaData.error === null) {
129+
if (metaData.response === "OK") {
130130
PREREVEAL_TOKEN_URI = metaData.metadata_uri;
131131
} else {
132132
console.log(

0 commit comments

Comments
 (0)