Browse Source

iguana_api.js updated with more api functions, dashboard fixes

master
Satinder Grewal 8 years ago
parent
commit
b1a73fc247
  1. 13
      assets/scripts/dashboard.js
  2. 32
      assets/scripts/iguana_api.js
  3. 9
      assets/scripts/sidebar.js

13
assets/scripts/dashboard.js

@ -340,7 +340,7 @@ var Dashboard = function() {
//console.log('http://127.0.0.1:7778/api/bitcoinrpc/getaddressesbyaccount?coin=' + AllcoinsDataOutput[value][index] + '&account=*');
//List coin addresses as drop down menu
var getaddrlist = {"agent":"SuperNET","method":"activehandle"};
/*var getaddrlist = {"agent":"SuperNET","method":"activehandle"};
$.ajax({
type: 'POST',
data: JSON.stringify(getaddrlist),
@ -364,7 +364,7 @@ var Dashboard = function() {
console.log(textStatus);
console.log(error);
}
});
});*/
@ -506,6 +506,11 @@ function getActiveEdexcoin() {
return active_edexcoin;
}
function hideExtCoinsinEdexDashboard(coin) {
var tmp_getinfo = EDEXgetinfo(coin)
console.log(tmp_getinfo);
}
function ShowCoinHistory(getData) {
Iguana_activehandle();
if ( sessionStorage.getItem('IguanaActiveAccount') === null ) {
@ -668,8 +673,8 @@ function getCoinBalance(coin) {
//dataType: 'text',
success: function(data, textStatus, jqXHR) {
var AjaxOutputData = JSON.parse(data);
//console.log('== Data OutPut ==');
//console.log(AjaxOutputData);
console.log('== Data OutPut getCoinBalance ==');
console.log(AjaxOutputData);
$('span[data-edexcoincode="' + coin + '"][id="edexcoin-balance"]').text(AjaxOutputData.result);
},
error: function(xhr, textStatus, error) {

32
assets/scripts/iguana_api.js

@ -581,4 +581,36 @@ function EDEXSendToAddr(data) {
}
});
return result;
}
function EDEXgetinfo(coin) {
var result = [];
//Get parameters values from confirm dialog and send currency
var getinfoValues = {"coin":coin,"agent":"bitcoinrpc","method":"getinfo","immediate":100,"timeout":4000};
console.log(getinfoValues);
$.ajax({
async: false,
type: 'POST',
data: JSON.stringify(getinfoValues),
url: 'http://127.0.0.1:7778',
//dataType: 'text',
success: function(data, textStatus, jqXHR) {
var AjaxOutputData = JSON.parse(data);
//console.log('== Data OutPut ==');
//console.log(AjaxOutputData);
result.push(AjaxOutputData);
},
error: function(xhr, textStatus, error) {
console.log('failed getting Coin History.');
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
Iguana_ServiceUnavailable();
}
console.log(textStatus);
console.log(error);
}
});
return result;
}

9
assets/scripts/sidebar.js

@ -43,7 +43,7 @@ $('#nav-dashboard').on('click', function() {
$(".header-easydex-section").text("Dashboard");
removeKMDWalletStyle();
removeZECWalletStyle();
CommonSidebarActionsSet01();
CommonSidebarActionsSet011();
applyDashboardStyle();
});
@ -211,6 +211,13 @@ function CommonSidebarActionsSet01() {
$('#wif-priv-keys').html('');
}
function CommonSidebarActionsSet011() {
sessionStorage.setItem('DashboardActions', "start");
location.reload();
$("#wifkeys_passphrase").val('');
$('#wif-priv-keys').html('');
}
function CommonSidebarActionsSet02() {
sessionStorage.setItem('DashboardActions', "stop");
$("#wifkeys_passphrase").val('');

Loading…
Cancel
Save