diff --git a/assets/scripts/kmd_wallet_dashboard.js b/assets/scripts/kmd_wallet_dashboard.js index 534f170..40aef7a 100644 --- a/assets/scripts/kmd_wallet_dashboard.js +++ b/assets/scripts/kmd_wallet_dashboard.js @@ -375,4 +375,43 @@ function KMDListaddrZ() { }); //console.log(result); return result; -} \ No newline at end of file +} + + +function KMDGetPublicTransactions() { + var result = []; + + var ajax_data = {"agent":"komodo","method":"passthru","function":"listtransactions","hex":""} + //console.log(ajax_data); + $.ajax({ + async: false, + type: 'POST', + data: JSON.stringify(ajax_data), + url: 'http://127.0.0.1:7778', + //dataType: 'text', + success: function(data, textStatus, jqXHR) { + var AjaxOutputData = JSON.parse(data); //Ajax output gets the whole list of unspent coin with addresses + //console.log('== Data OutPut of listtransactions =='); + //console.log(AjaxOutputData); + + $.each(AjaxOutputData, function(index, value) { + //console.log(value); + tmplisttransactions = {"type":"public","category": AjaxOutputData[index].category,"confirmations": AjaxOutputData[index].confirmations,"amount": AjaxOutputData[index].amount,"time": AjaxOutputData[index].time,"address": AjaxOutputData[index].address,"txid": AjaxOutputData[index].txid} + //console.log(tmplisttransactions); + //result.push(tmplisttransactions); + }); + }, + 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); + } + }); + //console.log(result); + return result; +} + diff --git a/index.html b/index.html index c5f606a..2f8e0cd 100755 --- a/index.html +++ b/index.html @@ -744,12 +744,12 @@
-
+
-
+