Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
RunOnFluxBot committed Nov 22, 2024
1 parent 6b27c78 commit fa9a96e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/hostInfoService.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ async function getHostInfo(req, res) {
res.json(errMessage);
} else {
const hostInfo = {};
hostInfo.id = await generalService.nodeCollateral();
const nodeCollateralInfo = await generalService.getCollateralInfo();
hostInfo.id = nodeCollateralInfo.txhash + nodeCollateralInfo.txindex;
const myIP = await fluxNetworkHelper.getMyFluxIPandPort();
hostInfo.ip = myIP.split(':')[0];
const myGeo = await geolocationService.getNodeGeolocation();
if (myGeo) {
delete myGeo.ip;
delete myGeo.org;
hostInfo.geo = JSON.stringify(myGeo);
hostInfo.geo = myGeo;
} else {
throw new Error('Geolocation information not available at the moment');
}
Expand Down

0 comments on commit fa9a96e

Please sign in to comment.