|
|
@ -44,20 +44,12 @@ function RunKMDInitFunctions() { |
|
|
|
'function': 'getinfo', |
|
|
|
'hex': '' |
|
|
|
}; |
|
|
|
if (isCorsproxy) { |
|
|
|
ajax_data = { |
|
|
|
'agent': 'bitcoinrpc', |
|
|
|
'method': 'getinfo', |
|
|
|
'params': [] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
console.log(ajax_data); |
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
data: JSON.stringify(ajax_data), |
|
|
|
headers: isCorsproxy ? { 'Authorization': 'Basic ' + btoa(rpcAuth.user + ':' + rpcAuth.pass) } : {}, |
|
|
|
url: isCorsproxy ? 'http://localhost:1337/localhost:7771' : 'http://127.0.0.1:' + config.iguanaPort, |
|
|
|
url: 'http://127.0.0.1:' + config.iguanaPort, |
|
|
|
success: function(data, textStatus, jqXHR) { |
|
|
|
var AjaxOutputData = JSON.parse(data); |
|
|
|
|
|
|
@ -68,17 +60,13 @@ function RunKMDInitFunctions() { |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function(xhr, textStatus, error) { |
|
|
|
if (isCorsproxy) { |
|
|
|
startBestBlockInterval(); |
|
|
|
} else { |
|
|
|
console.log('failed getting Coin History.'); |
|
|
|
console.log(xhr.statusText); |
|
|
|
if ( xhr.readyState == 0 ) { |
|
|
|
Iguana_ServiceUnavailable(); |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
console.log('failed getting Coin History.'); |
|
|
|
console.log(xhr.statusText); |
|
|
|
if ( xhr.readyState == 0 ) { |
|
|
|
Iguana_ServiceUnavailable(); |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|