Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function (error, data, response) {
try{
var feed = JSON.parse(data);
if(global.debug){console.log(data)}
outputJSON.balance = feed["json.accountBalanceResponse"];
outputJSON.success=true;
outputJSON.epoch = (new Date).getTime();
outputJSON.runtime = (new Date).getTime() - outputJSON.runtime;
callback(outputJSON);
return;
}
catch(e){
outputJSON.success=false;
if(global.debug){
console.log(outputJSON);
console.log(data);
console.log(response);
outputJSON.response = response;
};