From 7714d8c26d09d5af4c5b650bc33137e448929f63 Mon Sep 17 00:00:00 2001
From: Satinder Grewal <grewal.satinder@gmail.com>
Date: Fri, 10 Feb 2017 04:48:48 +1300
Subject: [PATCH] few more updates

---
 assets/scripts/dashboard.js  | 17 ++++++++++++++---
 assets/scripts/iguana_api.js |  8 ++++----
 index.html                   |  4 ++--
 3 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/assets/scripts/dashboard.js b/assets/scripts/dashboard.js
index f8111b6..b9f293e 100644
--- a/assets/scripts/dashboard.js
+++ b/assets/scripts/dashboard.js
@@ -295,6 +295,7 @@ var Dashboard = function() {
         var active_edexcoin = '';
         var tmp_send_to_addr = '';
         var tmp_send_total_amount = '';
+        $('#edexcoin_send_coins_btn').prop('disabled', false);
         edexcoin_send_form_validator.resetForm();
       });
 
@@ -619,7 +620,7 @@ var Dashboard = function() {
                 console.log('wallet widget refereshed (every 15 seconds)');
             }, 15000);*/
 
-            RunTotalFiatValue = setInterval(function() {
+            /*RunTotalFiatValue = setInterval(function() {
                 if ( sessionStorage.getItem('IguanaActiveAccount') === null ) {
                 //console.log('=> No wallet logged in. No need to get Rates.');
                 //StopTotalFiatValue();
@@ -627,7 +628,7 @@ var Dashboard = function() {
                     //TotalFiatValue();
                     //console.log('Get Rates (every 60 seconds)');
                 }
-            }, 60000);
+            }, 60000);*/
 
         }
 
@@ -695,8 +696,18 @@ function edexCoinBtnAction() {
         $('#edexcoin_active_addr').text(result);
         $('#edexcoin_active_addr_clipboard').attr("data-clipboard-text",result)
       })
-      var clipboard = new Clipboard('.btn');
+      
       $('#edexcoin_active_addr_clipboard').click(function(){alertify.success("Address Copied.");})
+      
+      var clipboard = new Clipboard('.clipboard-edexaddr');
+      clipboard.destroy();
+
+      var clipboard = null;      
+      if( clipboard != null ) {
+        clipboard.destroy();
+      }
+      
+      var clipboard = new Clipboard('.clipboard-edexaddr');
       clipboard.on('success', function(e) {
         console.info('Action:', e.action);
         console.info('Text:', e.text);
diff --git a/assets/scripts/iguana_api.js b/assets/scripts/iguana_api.js
index ce68eb5..f662a7b 100644
--- a/assets/scripts/iguana_api.js
+++ b/assets/scripts/iguana_api.js
@@ -727,10 +727,10 @@ function EDEXSendToAddr(data) {
             var selected_coinmode = sessionStorage.getItem('edexTmpMode')
             if ( selected_coinmode == 'Basilisk' ) {
                 var active_edexcoin = $('[data-edexcoin]').attr("data-edexcoin");
-                var coinwalletbalance = getDEXCoinBalance(active_edexcoin)
-                console.log(coinwalletbalance)
-                //coinwalletbalance = coinwalletbalance.total
-                $('#edex_total_balance').text(coinwalletbalance.total);
+                getDEXGetBalance(active_edexcoin).then(function(result){
+                    //console.log(result)
+                    $('#edex_total_balance').text(result.total);
+                });
             } else {
                 var active_edexcoin = $('[data-edexcoin]').attr("data-edexcoin");
                 var tmp_get_coin_balance = EDEXlistunspent(active_edexcoin)
diff --git a/index.html b/index.html
index 7239f85..3bc2747 100755
--- a/index.html
+++ b/index.html
@@ -718,7 +718,7 @@
     <!-- Begin page header -->
       <div class="page-header page-header-bordered header-easydex" id="header-dashboard" data-edexcoin="COIN" style="display: none;">
       <ol class="breadcrumb" data-edexcoin="COIN">
-        <b>My <span data-edexcoin="COIN" id="edexcoin-active">-</span> Address: </b> <span data-edexcoin="COIN" id="edexcoin_active_addr">-</span> <button class="btn btn-default btn-xs" data-edexcoin="COIN" id="edexcoin_active_addr_clipboard" data-clipboard-text=""><i class="icon wb-copy" aria-hidden="true"></i> copy</button>
+        <b>My <span data-edexcoin="COIN" id="edexcoin-active">-</span> Address: </b> <span data-edexcoin="COIN" id="edexcoin_active_addr">-</span> <button class="btn btn-default btn-xs clipboard-edexaddr" data-edexcoin="COIN" id="edexcoin_active_addr_clipboard" data-clipboard-text=""><i class="icon wb-copy" aria-hidden="true"></i> copy</button>
       </ol>
       <div class="page-header-actions" data-edexcoin="COIN" id="edexcoin-actions">
         <!-- EasyDEX Coin Wallet Header button -->
@@ -1900,7 +1900,7 @@
   </script>
   <script type="text/javascript">
   jQuery(document).ready(function(){
-    //jQuery('.scrollbar-dynamic').scrollbar();
+    jQuery('.scrollbar-dynamic').scrollbar();
   });
   </script>
   <script>if (window.module) module = window.module;</script>