Browse Source

bug fixed to switch API from komodo to zcash gui, and added interest to show in komodo GUI

master
Satinder Grewal 8 years ago
parent
commit
1d8c4bc5a1
  1. 28
      assets/scripts/kmd_wallet_dashboard.js
  2. 1
      assets/scripts/sidebar.js
  3. 22
      index.html

28
assets/scripts/kmd_wallet_dashboard.js

@ -260,7 +260,7 @@ function RunInitFunctions() {
function getHeaderActionMenuButtonCoinCode() {
var extcoin = $('#extcoin-wallet').data('extcoin');
var extcoin = $('[data-extcoin]').attr("data-extcoin");
var action_menu_button_code = '';
if ( extcoin == 'KMD') { action_menu_button_code = 'kmd'; };
if ( extcoin == 'ZEC') { action_menu_button_code = 'zec'; };
@ -268,7 +268,7 @@ function getHeaderActionMenuButtonCoinCode() {
}
function getPassthruAgent() {
var extcoin = $('#extcoin-wallet').data('extcoin');
var extcoin = $('[data-extcoin]').attr("data-extcoin");
var passthru_agent = '';
if ( extcoin == 'KMD') { passthru_agent = 'komodo'; };
if ( extcoin == 'ZEC') { passthru_agent = 'zcash'; };
@ -276,8 +276,8 @@ function getPassthruAgent() {
}
function getTotalKMDBalance() {
console.log($('#extcoin-wallet').data('extcoin'));
var extcoin = $('#extcoin-wallet').data('extcoin');
console.log($('[data-extcoin]').attr("data-extcoin"));
var extcoin = $('[data-extcoin]').attr("data-extcoin");
var passthru_agent = '';
if ( extcoin == 'KMD') { passthru_agent = 'komodo'; };
if ( extcoin == 'ZEC') { passthru_agent = 'zcash'; };
@ -293,6 +293,26 @@ function getTotalKMDBalance() {
var AjaxOutputData = JSON.parse(data);
//console.log('== Data OutPut ==');
//console.log(AjaxOutputData);
if (AjaxOutputData.interest != undefined) {
console.log('show interest..');
$('#kmd_total_interest_balance').text(AjaxOutputData.interest);
$('#kmd_widget_get_total_balance_i').show();
$('#kmd_widget_get_total_balance_t').addClass(' col-lg-3');
$('#kmd_widget_get_total_balance_t').removeClass('col-lg-4');
$('#kmd_widget_get_total_balance_z').addClass(' col-lg-3');
$('#kmd_widget_get_total_balance_z').removeClass(' col-lg-4');
$('#kmd_widget_get_total_balance_tzi').addClass(' col-lg-3');
$('#kmd_widget_get_total_balance_tzi').removeClass(' col-lg-4');
} else {
console.log('do not show interest...');
$('#kmd_widget_get_total_balance_i').hide();
$('#kmd_widget_get_total_balance_t').addClass(' col-lg-4');
$('#kmd_widget_get_total_balance_t').removeClass(' col-lg-3');
$('#kmd_widget_get_total_balance_z').addClass(' col-lg-4');
$('#kmd_widget_get_total_balance_z').removeClass(' col-lg-3');
$('#kmd_widget_get_total_balance_tzi').addClass(' col-lg-4');
$('#kmd_widget_get_total_balance_tzi').removeClass(' col-lg-3');
}
$('#kmd_transparent_balance').text(AjaxOutputData.transparent);
$('#kmd_private_balance').text(AjaxOutputData.private);
$('#kmd_total_tz_balance').text(AjaxOutputData.total);

1
assets/scripts/sidebar.js

@ -116,6 +116,7 @@ $('#nav-zcash-wallet').on('click', function() {
$('#nav-iguana-wallet-settings').removeClass( " active open" ).addClass( "" );
$('#nav-about-iguana').removeClass( " active open" ).addClass( "" );
$(".header-easydex-section").text("Zcash Wallet");
console.log('changing to zcash')
$.each($('[data-extcoin]'), function(index, value) {$('[data-extcoin]').attr("data-extcoin","ZEC"); $('[data-extcoin="ZEC"]')});
$.each($('[data-extcoinname]'), function(index, value) {$('[data-extcoinname]').text("ZEC"); $('[data-extcoinname="ZEC"]')});
$.each($('[data-extcointitle]'), function(index, value) {$('[data-extcointitle]').text("Zcash"); $('[data-extcointitle="Zcash"]')});

22
index.html

@ -620,7 +620,7 @@
<div class="page-content" data-extcoin="COIN" id="section-extcoin">
<div class="row" data-extcoin="COIN" id="extcoin-wallet" data-plugin="masonry">
<div class="col-xs-12">
<div class="col-lg-4 col-xs-12">
<div class="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_t">
<!-- KMD Transparent Balance Widget-->
<div class="widget widget-shadow" id="widgetLineareaOne">
<div class="widget-content white bg-yellow-800">
@ -636,7 +636,7 @@
</div>
<!-- End KMD Transparent Balance Widget -->
</div>
<div class="col-lg-4 col-xs-12">
<div class="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_z">
<!-- KMD Private (Z) Balance Widget-->
<div class="widget widget-shadow" id="widgetLineareaOne">
<div class="widget-content white bg-blue-grey-800">
@ -652,7 +652,23 @@
</div>
<!-- End KMD Private (Z) Balance Widget -->
</div>
<div class="col-lg-4 col-xs-12">
<div class="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_i">
<!-- KMD Total Interest Balance Widget-->
<div class="widget widget-shadow" id="widgetLineareaOne">
<div class="widget-content white bg-cyan-700">
<div class="padding-20 padding-top-10">
<div class="clearfix">
<div class="pull-left padding-vertical-10">
<i class="icon fa-money font-size-24 vertical-align-bottom margin-right-5"></i>Interest Earned
</div>
<span class="pull-right font-size-30" data-extcoin="COIN" id="kmd_total_interest_balance">-</span>
</div>
</div>
</div>
</div>
<!-- End KMD Total Interest Balance Widget -->
</div>
<div class="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_tzi">
<!-- KMD Total (Z+T) Balance Widget-->
<div class="widget widget-shadow" id="widgetLineareaOne">
<div class="widget-content white bg-green-600">

Loading…
Cancel
Save