Browse Source

flush cache if local data is corrupted

master
pbca26 8 years ago
parent
commit
934a2b0461
  1. 1
      assets/scripts/dashboard.js
  2. 16
      assets/scripts/iguana_api/IguanaEDEX.js
  3. 8
      assets/scripts/iguana_api/IguanaShepherd.js

1
assets/scripts/dashboard.js

@ -916,7 +916,6 @@ jQuery(document).ready(function() {
Dashboard.init();
});
function resizeDashboardWindow() {
/* set default map height */
var navbarH = $('.site-navbar').outerHeight(),

16
assets/scripts/iguana_api/IguanaEDEX.js

@ -285,10 +285,10 @@ function EDEXSendutxoRawTx(data) {
return new Promise(function(resolve, reject) {
//console.log(gettxdata)
//console.log(utxos_set)
EDEX_GetTxIDList(gettxdata).then(function(get_txid_list){
console.log(get_txid_list)
resolve(get_txid_list);
})
EDEX_GetTxIDList(gettxdata).then(function(get_txid_list) {
console.log(get_txid_list)
resolve(get_txid_list);
});
/*EDEX_ProcessRefreshData(gettxdata,utxos_set).then(function(new_utxos_set) {
console.log(new_utxos_set);
resolve(new_utxos_set);
@ -298,7 +298,7 @@ function EDEXSendutxoRawTx(data) {
var get_data_cache_contents = function(get_txid_list) {
return new Promise(function(resolve, reject) {
console.log(get_txid_list)
console.log(get_txid_list);
//console.log(send_data)
//console.log(send_data.sendfrom)
Shepherd_GroomData_Get().then(function(result) {
@ -310,8 +310,8 @@ function EDEXSendutxoRawTx(data) {
console.log(result.basilisk.KMD[send_data.sendfrom].refresh);
var save_this_data = result;*/
var save_this_data = EDEX_RemoveTXID(result, get_txid_list);
console.log(save_this_data)
//resolve(result);
console.log(save_this_data);
//resolve(result);
resolve(save_this_data);
});
});
@ -659,7 +659,7 @@ function EDEXgetaddrbyaccount_cache(coin) {
.then(result => {
//console.log(result);
resolve(result);
})
});
});
});
}

8
assets/scripts/iguana_api/IguanaShepherd.js

@ -221,7 +221,13 @@ function Shepherd_GetBasiliskCache() {
url: 'http://127.0.0.1:17777/shepherd/cache',
contentType: 'application/json' // send as JSON
}).done(function(data) {
resolve(data);
resolve(data);
data = JSON.parse(data);
if (data.result === 'JSON parse error') {
Shepherd_GroomData_Delete().then(function(result) {
console.log('error reading cache, flushing...');
});
}
});
});
}

Loading…
Cancel
Save