|
|
@ -22,15 +22,12 @@ cache.get = function(req, res, next) { |
|
|
|
|
|
|
|
res.end(JSON.stringify(errorObj)); |
|
|
|
} else { |
|
|
|
//var parsedJSON = 'JPARSE';//'JSON parse error';
|
|
|
|
|
|
|
|
try { |
|
|
|
var parsedJSON = JSON.parse(data); |
|
|
|
|
|
|
|
var successObj = { |
|
|
|
'msg': 'success', |
|
|
|
'result': parsedJSON |
|
|
|
}; |
|
|
|
var parsedJSON = JSON.parse(data), |
|
|
|
successObj = { |
|
|
|
'msg': 'success', |
|
|
|
'result': parsedJSON |
|
|
|
}; |
|
|
|
|
|
|
|
res.end(JSON.stringify(successObj)); |
|
|
|
} catch (e) { |
|
|
@ -548,7 +545,7 @@ cache.one = function(req, res, next) { |
|
|
|
if (addresses) { |
|
|
|
parseAddresses(coin, addresses); |
|
|
|
} else { |
|
|
|
var tempUrl = 'http://' + cache.appConfig.host + ':' + iguanaCorePort + '/api/bitcoinrpc/getaddressesbyaccount?userpass=' + sessionKey + '&coin=' + coin + '&account=*'; |
|
|
|
var tempUrl = 'http://' + cache.appConfig.host + ':' + cache.appConfig.iguanaCorePort /*iguanaCorePort*/ + '/api/bitcoinrpc/getaddressesbyaccount?userpass=' + sessionKey + '&coin=' + coin + '&account=*'; |
|
|
|
request({ |
|
|
|
url: mock ? 'http://localhost:17777/shepherd/mock?url=' + tempUrl : tempUrl, |
|
|
|
method: 'GET' |
|
|
@ -579,7 +576,7 @@ cache.one = function(req, res, next) { |
|
|
|
}); |
|
|
|
|
|
|
|
if (coin === 'all') { |
|
|
|
var tempUrl = 'http://' + cache.appConfig.host + ':' + iguanaCorePort + '/api/InstantDEX/allcoins?userpass=' + sessionKey; |
|
|
|
var tempUrl = 'http://' + cache.appConfig.host + ':' + /*iguanaCorePort*/ cache.appConfig.iguanaCorePort + '/api/InstantDEX/allcoins?userpass=' + sessionKey; |
|
|
|
request({ |
|
|
|
url: mock ? 'http://localhost:17777/shepherd/mock?url=' + tempUrl : tempUrl, |
|
|
|
method: 'GET' |
|
|
|