Skip to content

Commit

Permalink
Merge pull request #206 from monkins1010/testnet
Browse files Browse the repository at this point in the history
Added GUI improvements and get bridgekeeper conf file values
  • Loading branch information
Asherda authored Jul 13, 2023
2 parents a1a432b + 966635a commit 57273b1
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
35 changes: 35 additions & 0 deletions routes/api/native/verusbridge/verusbridge.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const server = require("verus_bridgekeeper");
const confFile = require("verus_bridgekeeper/confFile");

module.exports = (api) => {

Expand Down Expand Up @@ -67,6 +68,18 @@ module.exports = (api) => {
});
};

api.native.bridgekeeper_getconf = (chainTicker) => {
return new Promise(async (resolve, reject) => {
if (chainTicker !== "VRSCTEST")
reject(new Error("bridgekeeper not currently supported outside of VRSCTEST"));

const result = confFile.loadConfFile(chainTicker);

if (result) resolve(result);
else reject(result);
});
};

api.setPost("/native/start_bridgekeeper", (req, res, next) => {
const { chainTicker } = req.body;

Expand Down Expand Up @@ -158,5 +171,27 @@ module.exports = (api) => {
});
}, true);

api.setPost("/native/bridgekeeper_getconf", (req, res, next) => {
const { chainTicker } = req.body;
api.native
.bridgekeeper_getconf(chainTicker)
.then((reply) => {
const retObj = {
msg: "success",
result: reply,
};

res.send(JSON.stringify(retObj));
})
.catch((error) => {
const retObj = {
msg: "error",
result: error,
};

res.send(JSON.stringify(retObj));
});
}, true);

return api;
};
1 change: 1 addition & 0 deletions routes/workers/openExternalSafe.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const allowedOrigins = [
'35.204.174.237:3001/insight/tx/',
'etherscan.io/tx/',
'ropsten.etherscan.io/tx/',
'www.infura.io'
]

function generateOpenExternalSafe(shell, url) {
Expand Down

0 comments on commit 57273b1

Please sign in to comment.