diff --git a/assets/scripts/dashboard.js b/assets/scripts/dashboard.js index 7d69e9f..f117e88 100644 --- a/assets/scripts/dashboard.js +++ b/assets/scripts/dashboard.js @@ -1085,7 +1085,7 @@ var Dashboard = function() { }); } - }, 10000); + }, 5000); var FetchBasiliskData = setInterval(function() { var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'), diff --git a/assets/scripts/kmd_wallet/KMDInit.js b/assets/scripts/kmd_wallet/KMDInit.js index dad995d..7a10e01 100644 --- a/assets/scripts/kmd_wallet/KMDInit.js +++ b/assets/scripts/kmd_wallet/KMDInit.js @@ -44,12 +44,20 @@ 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), - url: 'http://127.0.0.1:' + config.iguanaPort, + headers: isCorsproxy ? { 'Authorization': 'Basic ' + btoa(rpcAuth.user + ':' + rpcAuth.pass) } : {}, + url: isCorsproxy ? 'http://localhost:1337/localhost:7771' : 'http://127.0.0.1:' + config.iguanaPort, success: function(data, textStatus, jqXHR) { var AjaxOutputData = JSON.parse(data); @@ -60,13 +68,17 @@ function RunKMDInitFunctions() { } }, error: function(xhr, textStatus, error) { - console.log('failed getting Coin History.'); - console.log(xhr.statusText); - if ( xhr.readyState == 0 ) { - Iguana_ServiceUnavailable(); + 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(textStatus); - console.log(error); } }); } @@ -129,7 +141,7 @@ function RunKMDInitFunctions() { } }); } - }, 2000); + }, 5000); } if (sessionStorage.getItem('edexTmpMode') === 'Native') { @@ -168,5 +180,4 @@ function RunKMDInitFunctions() { NProgress.done(); } CheckIfConnected(_RunKMDInitFunctions); - } \ No newline at end of file diff --git a/assets/scripts/kmd_wallet_dashboard.js b/assets/scripts/kmd_wallet_dashboard.js index a47af8f..290ec55 100644 --- a/assets/scripts/kmd_wallet_dashboard.js +++ b/assets/scripts/kmd_wallet_dashboard.js @@ -82,7 +82,6 @@ function CheckIfConnected(cb) { console.log(ajax_data); $.ajax({ - //async: false, type: 'POST', data: JSON.stringify(ajax_data), url: 'http://127.0.0.1:' + config.iguanaPort,