Browse Source

Merge pull request #101 from pbca26/master

manual basilisk refresh update
master
pbca26 8 years ago
committed by GitHub
parent
commit
e8ece35799
  1. 11
      assets/scripts/dashboard.js
  2. 19
      assets/scripts/iguana_api/IguanaShepherd.js
  3. 5
      assets/scripts/templates/dashboardInfo.js

11
assets/scripts/dashboard.js

@ -933,11 +933,11 @@ var Dashboard = function() {
$('#addcoin_mdl_full_mode').prop('disabled', true);
}
if (tmp_coin_val == 'BTC') {
$('#addcoin_mdl_basilisk_mode').prop('disabled', true)
$('#addcoin_mdl_native_mode').prop('disabled', true);
$('#addcoin_mdl_full_mode')
$('#addcoin_mdl_basilisk_mode')
.prop('disabled', false)
.prop('checked', true);
$('#addcoin_mdl_native_mode').prop('disabled', true);
$('#addcoin_mdl_full_mode').prop('disabled', false);
}
if (tmp_coin_val == 'ZEC') {
$('#addcoin_mdl_basilisk_mode').prop('disabled', true);
@ -1008,6 +1008,11 @@ var Dashboard = function() {
});
});
$('.btn_edexcoin_dashboard_update_utxo').click(function() {
var selected_coin = $(this).data('edexcoin');
Shepherd_RefreshUTXO();
});
$('.btn_edexcoin_dashboard_refresh_basilisk_conn').click(function() {
var show_mdl = setTimeout(function() {
var selected_coin = $(this).data('edexcoin');

19
assets/scripts/iguana_api/IguanaShepherd.js

@ -106,6 +106,7 @@ function Shepherd_FetchBasiliskData(req_data) {
var req_url = 'http://127.0.0.1:17777/shepherd/cache-one';
ajax_data.coin = req_data.coin;
ajax_data.calls = req_data.calls;
ajax_data.address = req_data.address;
}
console.log(ajax_data);
@ -227,6 +228,21 @@ function Shepherd_GetBasiliskCache() {
});
}
function Shepherd_RefreshUTXO(coin, address) {
coin = 'KMD';
address = 'RDbGxL8QYdEp8sMULaVZS2E6XThcTKT9Jd';
var call_data = {
'allcoins': false,
'coin': coin,
'address': address,
'calls': 'refresh'
};
Shepherd_FetchBasiliskData(call_data)
.then(function(result) {
console.log(result);
});
}
function Shepherd_CheckBasiliskCacheData(coin) {
return new Promise((resolve) => {
Shepherd_GetBasiliskCache()
@ -342,6 +358,3 @@ function Shepherd_SendPendValue() {
sessionStorage.setItem('IguanaPendValue', pend_val);
});
}

5
assets/scripts/templates/dashboardInfo.js

@ -41,6 +41,11 @@ templates.dashboardInfo =
<i class="icon fa-cloud-download" aria-hidden="true"></i> <span data-lang="INDEX.REFETCH_WALLET_DATA"></span>
</a>
</li>
<li data-edexcoin="COIN" role="presentation">
<a href="javascript:void(0)" class="btn_edexcoin_dashboard_update_utxo" data-edexcoin="COIN" id="btn_edexcoin_dashboard_update_utxo" role="menuitem">
<i class="icon fa-cloud-download" aria-hidden="true"></i> Refresh UTXO
</a>
</li>
<!--<li data-edexcoin="COIN" role="presentation"><a href="javascript:void(0)" class="btn_edexcoin_dashboard_register" data-edexcoin="COIN" id="btn_edexcoin_dashboard_register" role="menuitem"><i class="icon fa-sign-in" aria-hidden="true"></i> Register All Wallet Address</a></li>-->
<!--<li data-edexcoin="COIN" role="presentation"><a href="javascript:void(0)" class="btn_edexcoin_dashboard_validate" data-edexcoin="COIN" id="btn_edexcoin_dashboard_validate" role="menuitem"><i class="icon fa-check" aria-hidden="true"></i> Validate Address on Network</a></li>-->
</ul>

Loading…
Cancel
Save