Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Jul 8, 2024
1 parent 0fd0117 commit 5987128
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
10 changes: 4 additions & 6 deletions cicd/applicationregister.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,14 @@ function importEndpointJson() {
function initApplicationRegister() {
if (process.env.PARENTNET_URL) {
parentnetURL = process.env.PARENTNET_URL;
} else if (process.env.PARENTNET) {
parentnet = process.env.PARENTNET;
if (parentnet == "devnet")
if (parentnetURL == "devnet")
parentnetURL = "https://devnetstats.apothem.network/devnet";
if (parentnet == "testnet")
if (parentnetURL == "testnet")
parentnetURL = "https://devnetstats.apothem.network/testnet";
if (parentnet == "mainnet")
if (parentnetURL == "mainnet")
parentnetURL = "https://devnetstats.apothem.network/mainnet";
} else {
throw Error("PARENTNET or PARENTNET_URL not found");
throw Error("PARENTNET_URL not found");
}

const reqENV = [
Expand Down
11 changes: 5 additions & 6 deletions cicd/endpointandregisterchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,17 @@ async function main() {
function initEndpointDeploy() {
if (process.env.PARENTNET_URL) {
parentnetURL = process.env.PARENTNET_URL;
} else if (process.env.PARENTNET) {
parentnet = process.env.PARENTNET;
if (parentnet == "devnet")
if (parentnetURL == "devnet")
parentnetURL = "https://devnetstats.apothem.network/devnet";
if (parentnet == "testnet")
if (parentnetURL == "testnet")
parentnetURL = "https://devnetstats.apothem.network/testnet";
if (parentnet == "mainnet")
if (parentnetURL == "mainnet")
parentnetURL = "https://devnetstats.apothem.network/mainnet";
} else {
throw Error("PARENTNET or PARENTNET_URL not found");
throw Error("PARENTNET_URL not found");
}


const reqENV = [
"SUBNET_PK",
"PARENTNET_PK",
Expand Down
10 changes: 4 additions & 6 deletions cicd/subswap.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,14 @@ function checkEndpointConfig() {
function initSubswapDeploy() {
if (process.env.PARENTNET_URL) {
parentnetURL = process.env.PARENTNET_URL;
} else if (process.env.PARENTNET) {
parentnet = process.env.PARENTNET;
if (parentnet == "devnet")
if (parentnetURL == "devnet")
parentnetURL = "https://devnetstats.apothem.network/devnet";
if (parentnet == "testnet")
if (parentnetURL == "testnet")
parentnetURL = "https://devnetstats.apothem.network/testnet";
if (parentnet == "mainnet")
if (parentnetURL == "mainnet")
parentnetURL = "https://devnetstats.apothem.network/mainnet";
} else {
throw Error("PARENTNET or PARENTNET_URL not found");
throw Error("PARENTNET_URL not found");
}

const reqENV = ["SUBNET_PK", "PARENTNET_PK", "SUBNET_URL"];
Expand Down

0 comments on commit 5987128

Please sign in to comment.