Browse Source

new test code for refresh data processing and some text corrections

master
Satinder Grewal 8 years ago
parent
commit
d10f2a4ff3
  1. 63
      assets/scripts/iguana_api.js
  2. 6
      index.html

63
assets/scripts/iguana_api.js

@ -1259,13 +1259,39 @@ function EDEXSendutxoRawTx(data) {
$('#edexcoin_sendto_result tbody').html(edexcoin_sendto_result_tbl);
$('#edexcoin_send_coins_anothertx_btn').show();
$('#edexcoin-send-txdetails-screen').data('panel-api').done();
var call_data = {"allcoins": false,"coin":'KMD',"calls":"refresh"}
console.log(call_data)
Shepherd_FetchBasiliskData(call_data).then(function(result){
var gettxiddata = function() {
return new Promise(function(resolve, reject) {
EDEXgettransaction(ajax_data_dexrawtx.coin,result.rawtx).then(function(result){
//console.log(result)
resolve(result)
})
});
}
var process_refresh_utxos = function(gettxdata) {
return new Promise(function(resolve, reject) {
console.log(gettxdata)
console.log(utxos_set)
EDEX_ProcessRefreshData(gettxdata,utxos_set).then(function(new_utxos_set){
console.log(new_utxos_set)
resolve(new_utxos_set)
})
});
}
gettxiddata()
.then(function(gettxdata) {
return process_refresh_utxos(gettxdata);
});
//var call_data = {"allcoins": false,"coin":ajax_data_dexrawtx.coin,"calls":"refresh"}
//console.log(call_data)
/*Shepherd_FetchBasiliskData(call_data).then(function(result){
console.log(result)
toastr.info('Refreshing Wallet Funds.', 'Wallet Notification');
})
})*/
} else {
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
toastr.success('Signed transaction sent successfully!', 'Wallet Notification');
@ -1481,6 +1507,33 @@ function EDEXgetinfo(coin) {
})
}
function EDEXgettransaction(coin,txid) {
return new Promise((resolve) => {
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
ajax_data = {
'userpass': tmpIguanaRPCAuth,
'symbol': coin,
'agent': 'dex',
'method': 'gettransaction',
'vout':1,
'txid': txid
};
console.log(ajax_data)
var AjaxOutputData = IguanaAJAX('http://127.0.0.1:7778',ajax_data).done(function(data) {
AjaxOutputData = JSON.parse(AjaxOutputData.responseText)
resolve(AjaxOutputData);
}).fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
}
console.log(textStatus);
console.log(error);
});
})
}
function EDEXgetaddrbyaccount_cache(coin) {
return new Promise((resolve) => {
Shepherd_GetBasiliskCache().then(function(result){

6
index.html

@ -1245,7 +1245,7 @@
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<span style="font-size:24px; text-align: center;"><i class="icon fa-paw" aria-hidden="true"></i> EXPERIMENTAL TEST VERSION ONLY</span><br>Jumblr feature is very experimental and as of yet is Only enabled for testing and debugging. Please use current version of Jumblr only with small amounts if you are participating in testing this feature.</a>
<span style="font-size:24px; text-align: center;"><i class="icon fa-paw" aria-hidden="true"></i> EXPERIMENTAL TEST VERSION ONLY</span><br>Jumblr feature is very experimental and for now, is Only enabled for testing and debugging. Please use the current version of Jumblr only with small amounts if you are participating in testing this feature.</a>
</div>
</div>
@ -1254,12 +1254,12 @@
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<span style="font-size:24px; text-align: center;"><i class="icon fa-paw" aria-hidden="true"></i> Need Native Mode Komodo</span><br>To use Jumblr feature you need to activate Komodo in Native Mode.<br>If you are already running Komodo in either Basilisk Mode or Full Mode, close the wallet and restart again to start Komodo In Native Mode.</a>.
<span style="font-size:24px; text-align: center;"><i class="icon fa-paw" aria-hidden="true"></i> Need Native Mode Komodo</span><br>To use Jumblr feature, you need to activate Komodo in Native Mode.<br>If you are already running Komodo in either Basilisk Mode or Full Mode, close the wallet and restart again to start Komodo In Native Mode.</a>.
</div>
</div>
<div class="col-xlg-12 col-md-12">
<p>This screen does not auto refresh. You will need to hit Refresh button on top right corner of the screen to get latest Jumblr data.</p>
<p>This screen does not auto refresh. You will need to hit the Refresh button on the top right corner of the screen to get latest Jumblr data.</p>
</div>
<!-- Jumblr Tab -->

Loading…
Cancel
Save