Browse Source

list public transactions list js code

master
Satinder Grewal 8 years ago
parent
commit
be18a75656
  1. 39
      assets/scripts/kmd_wallet_dashboard.js
  2. 4
      index.html

39
assets/scripts/kmd_wallet_dashboard.js

@ -376,3 +376,42 @@ function KMDListaddrZ() {
//console.log(result);
return result;
}
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;
}

4
index.html

@ -744,12 +744,12 @@
</div>
<div class="panel-body container-fluid">
<div class="row">
<div class="col-lg-6 form-group form-material">
<div class="col-xlg-12 form-group form-material">
<label class="control-label" for="kmd_wallet_send_from">Send From</label>
<select class="form-control form-material showkmdwalletaddrs show-tick" id="kmd_wallet_send_from" title="Select Transparent or Private KMD Address" data-size="5">
</select>
</div>
<div class="col-lg-6 form-group form-material">
<div class="col-xlg-12 form-group form-material">
<label class="control-label" for="kmd_wallet_sendto">Send To</label>
<input type="text" class="form-control" id="kmd_wallet_sendto" name="kmd_wallet_sendto" placeholder="Enter Transparent or Private KMD address" autocomplete="off" required/>
</div>

Loading…
Cancel
Save