From 744a834e6cf4536f37659846819eebd8ee7142d8 Mon Sep 17 00:00:00 2001 From: Satinder Grewal Date: Mon, 15 Aug 2016 21:25:30 +1200 Subject: [PATCH] test --- assets/scripts/coinwallets.js | 10 +++++----- assets/scripts/dashboard.js | 8 +++----- index.html | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/assets/scripts/coinwallets.js b/assets/scripts/coinwallets.js index ce75073..cf2f47f 100644 --- a/assets/scripts/coinwallets.js +++ b/assets/scripts/coinwallets.js @@ -64,8 +64,8 @@ $('#mdl_currency_amount').keyup(function() { var total_of_currency_fiat = total_of_currency_fee * currency_fiat_value; //console.log($('#mdl_currency_amount').val()); //console.log(total_of_currency_fiat); - $('#mdl_currency_total_value').text(total_of_currency_fee); - $('#mdl_currency_total_fiat_value').text(total_of_currency_fiat.toFixed(5)+' '+localStorage.getItem('EasyDEX_FiatCurrency')); + $('#mdl_currency_total_value').text(total_of_currency_fee.toFixed(8)); + $('#mdl_currency_total_fiat_value').text(total_of_currency_fiat.toFixed(4)+' '+localStorage.getItem('EasyDEX_FiatCurrency')); }); $('#mdl_currency_fee').keyup(function() { @@ -82,8 +82,8 @@ $('#mdl_currency_fee').keyup(function() { var total_of_currency_fiat = total_of_currency_fee * currency_fiat_value; //console.log($('#mdl_currency_amount').val()); //console.log(total_of_currency_fiat); - $('#mdl_currency_total_value').text(total_of_currency_fee); - $('#mdl_currency_total_fiat_value').text(total_of_currency_fiat.toFixed(5)+' '+localStorage.getItem('EasyDEX_FiatCurrency')); + $('#mdl_currency_total_value').text(total_of_currency_fee.toFixed(8)); + $('#mdl_currency_total_fiat_value').text(total_of_currency_fiat.toFixed(4)+' '+localStorage.getItem('EasyDEX_FiatCurrency')); }); function CurrencyMdlBtnClose() { @@ -117,7 +117,7 @@ function ExecuteSendCurrencyAPI() { var confirm_sendto_address = $('#mdl_confirm_currency_sendto_addr').text(); //Get parameters values from confirm dialog and send currency - var sendtoaddrvalues = {"method":"sendtoaddress","params":[confirm_sendto_address,0.001,"EasyDEX","EasyDEXTransaction"]}; + var sendtoaddrvalues = {"method":"sendtoaddress","params":[confirm_sendto_address,confirm_send_amount,"EasyDEX","EasyDEXTransaction"]}; console.log(sendtoaddrvalues); $.ajax({ type: 'POST', diff --git a/assets/scripts/dashboard.js b/assets/scripts/dashboard.js index b3d7c4a..51c2d61 100644 --- a/assets/scripts/dashboard.js +++ b/assets/scripts/dashboard.js @@ -194,8 +194,6 @@ var Dashboard = function() { //console.log('== Data OutPut =='); //console.log(CoinHistoryData); - - //var testhistory = {"result":"success","received":[{"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":9.94390000,"numseconds":1410727,"details":{"txid":"e0330be4ec6f2fd27bc26c559524ccd808a589a0752e18618b358d288d62be3a","vout":1,"height":1195141,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.89000000,"numseconds":1340168,"details":{"txid":"46b210cd0d505e88b738d1ca09595e33dc435f11d53e0516566deb0a9e0de5ba","vout":1,"height":1196389,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.94590000,"numseconds":1340168,"details":{"txid":"67499f6ccefadf046e7e26b9a650f32b6dd472046356d79f35714f37482692d8","vout":1,"height":1196382,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.87900000,"numseconds":1319872,"details":{"txid":"2426d9e0d3643706c0709af8e5342106633030b59ef738cb75d3c19aebe51a40","vout":1,"height":1196766,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.97890000,"numseconds":1319871,"details":{"txid":"820b553726e055de46ee40652b86692be2c52fd561edf8a927ab012be46b4ed4","vout":1,"height":1196748,"relays":1}}],"sent":[{"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":9.94390000,"numseconds":1410727,"details":{"txid":"e0330be4ec6f2fd27bc26c559524ccd808a589a0752e18618b358d288d62be3a","vout":1,"height":1195141,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.89000000,"numseconds":1340168,"details":{"txid":"46b210cd0d505e88b738d1ca09595e33dc435f11d53e0516566deb0a9e0de5ba","vout":1,"height":1196389,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.94590000,"numseconds":1340168,"details":{"txid":"67499f6ccefadf046e7e26b9a650f32b6dd472046356d79f35714f37482692d8","vout":1,"height":1196382,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.87900000,"numseconds":1319872,"details":{"txid":"2426d9e0d3643706c0709af8e5342106633030b59ef738cb75d3c19aebe51a40","vout":1,"height":1196766,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.97890000,"numseconds":1319871,"details":{"txid":"820b553726e055de46ee40652b86692be2c52fd561edf8a927ab012be46b4ed4","vout":1,"height":1196748,"relays":1}}],"coin":"BTCD","balance":13.63770000,"tag":"10703025980307863381"}; var testhistory = {"result":"success","history":[{"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":0.02376752,"numseconds":5103473,"details":{"txid":"2a70dca9f0ba2bf77c9fe59cdc8538c7bf87eee077af687f3271a5461b087baa","vout":56,"height":1138822,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":0.01810419,"numseconds":5104375,"details":{"txid":"b66f4c51ca2ae08695171c7d9cbeca10b85d321a721895de3804aa7e204606b7","vout":56,"height":1138810,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":0.10304500,"numseconds":3900995,"details":{"txid":"9a85ec8b3d34eed29af054783120801f81d18aee2e596d3118dfc02d8ada77a4","vout":66,"height":1159828,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":0.02244710,"numseconds":3901699,"details":{"txid":"241c353c6e0b7dc43960d6b4a4fb9cc527e797335a5d6a8f0b03888f74081d03","vout":62,"height":1159817,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":256.85168445,"numseconds":3284547,"details":{"txid":"0a97fceed78efb91fc0cdbb14f7757ded296cd0bdc4d437303a4d56aa79a68c8","vout":2,"height":1170454,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":270.76000000,"numseconds":3288542,"details":{"txid":"0f09288c22a87e15e646f6b8bd6c486f0f3c07bce94fe98321b9e01faf369811","vout":1,"height":1170388,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":274.16000000,"numseconds":3298564,"details":{"txid":"f832780904d01445c7f28b82a1adffa4f0435c202b8a77a8be5bb3f5367e83d8","vout":1,"height":1170218,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":272.40878698,"numseconds":3299728,"details":{"txid":"7d45235130db08fdb3bcd3aec695a958749e8ada75087f98ce0dd7d2e3c8838f","vout":2,"height":1170203,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":137.10996017,"numseconds":3238596,"details":{"txid":"b2321bd1b472fe2cab5d3063e46ed630157a4a796c026e03b7ee82f5f641bf9c","vout":2,"height":1171264,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":137.09000000,"numseconds":3238596,"details":{"txid":"b2321bd1b472fe2cab5d3063e46ed630157a4a796c026e03b7ee82f5f641bf9c","vout":1,"height":1171264,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":135.39260510,"numseconds":3240926,"details":{"txid":"82fb07354dcde25d16d590a61374f18724b3393f79dae2c759f86540b87ca2b2","vout":2,"height":1171232,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":135.39000000,"numseconds":3240926,"details":{"txid":"82fb07354dcde25d16d590a61374f18724b3393f79dae2c759f86540b87ca2b2","vout":1,"height":1171232,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":274.19000000,"numseconds":3241822,"details":{"txid":"6102ac2775dec4dcf4775a6d0b195cd5fd8aec4b4c02a15072389ae4f5568740","vout":1,"height":1171211,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":128.42000000,"numseconds":3242717,"details":{"txid":"c08820095320f87e8e44079d7e192d3eac9db0bbd6deb5427fc44b7203482e2c","vout":1,"height":1171188,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":136.22436074,"numseconds":3195488,"details":{"txid":"9fb4af083d6a44d0fec4371c386ea6941b79c92aab9a49234bb417cf05d3a95f","vout":2,"height":1171992,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":136.21000000,"numseconds":3195488,"details":{"txid":"9fb4af083d6a44d0fec4371c386ea6941b79c92aab9a49234bb417cf05d3a95f","vout":1,"height":1171992,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":136.22394341,"numseconds":3197886,"details":{"txid":"a704433666022059b1c1cbff0dbb056b1ebbf50f4835a28c40cf2f2a43406f65","vout":2,"height":1171950,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":136.22000000,"numseconds":3197886,"details":{"txid":"a704433666022059b1c1cbff0dbb056b1ebbf50f4835a28c40cf2f2a43406f65","vout":1,"height":1171950,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":64.22669459,"numseconds":3199611,"details":{"txid":"edf827ab8aef2b62b2b7d72866bf8271407bf051ed799af52ce8429fae8e5bde","vout":2,"height":1171922,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":64.21000000,"numseconds":3199611,"details":{"txid":"edf827ab8aef2b62b2b7d72866bf8271407bf051ed799af52ce8429fae8e5bde","vout":1,"height":1171922,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":128.44353936,"numseconds":3201806,"details":{"txid":"89ce935417e49ce28bf7d5d31df166f576d97be4cb0ef72b409c2d570dc70147","vout":2,"height":1171880,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":128.43000000,"numseconds":3201806,"details":{"txid":"89ce935417e49ce28bf7d5d31df166f576d97be4cb0ef72b409c2d570dc70147","vout":1,"height":1171880,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":137.11374459,"numseconds":3206060,"details":{"txid":"a32ba7ca22fbb01b226dc21ffe3071a3ed11434e059a763b5a5dacb3e8000051","vout":2,"height":1171808,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":137.10000000,"numseconds":3206060,"details":{"txid":"a32ba7ca22fbb01b226dc21ffe3071a3ed11434e059a763b5a5dacb3e8000051","vout":1,"height":1171808,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":128.44940595,"numseconds":3210714,"details":{"txid":"edb8cf0079bcc41e7cca590ced45979fe2de72c97340d8fa140570f76aebdbb7","vout":2,"height":1171732,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":128.43000000,"numseconds":3210714,"details":{"txid":"edb8cf0079bcc41e7cca590ced45979fe2de72c97340d8fa140570f76aebdbb7","vout":1,"height":1171732,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":136.22036421,"numseconds":3219390,"details":{"txid":"8a101b692ff233d528d01f36ebfa7004beba02f98a157d2e55e2914df9bc87de","vout":2,"height":1171591,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":136.22000000,"numseconds":3219390,"details":{"txid":"8a101b692ff233d528d01f36ebfa7004beba02f98a157d2e55e2914df9bc87de","vout":1,"height":1171591,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":815.20263247,"numseconds":1984057,"details":{"txid":"be429824bb4d3c67956d7d7458d8485b8b6a529275f7b37221afc69ae9fbddfe","vout":1,"height":1193330,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":340.71761164,"numseconds":464110,"details":{"txid":"9cce9b4b570622fe03b521b4c798c7704fd457bbd4f36ac85ab8a2f74798e2fe","vout":1,"height":1221983,"relays":1}}, {"address":"REzqSJ7qonDbMVWfPEJKfRPduvfPyumkPR","amount":155.41088201,"numseconds":387136,"details":{"txid":"92b671a5381ba536357923859baa155a2cd1297a6f3afc7b904cd7ca26cff582","vout":1,"height":1223337,"relays":1}}],"coin":"BTCD","balance":5066.99357948,"tag":"15046830879277684209"}; //console.log(testhistory.history.reverse()); //console.log(testhistory.sent); @@ -278,7 +276,7 @@ var Dashboard = function() { handleWalletWidgets(); handleWalletSendRec(); - //TotalFiatValue(); + TotalFiatValue(); setInterval(function() { handleWalletWidgets(); @@ -416,8 +414,8 @@ function TotalFiatValue() { //console.log('total btc btcd usd value') //console.log(tmp_btcd_fiat_toal); console.log(tmp_btc_fiat_toal); - $('span[data-currency="BTC"][id="header_coinfiatbalance"]').text(tmp_btc_fiat_toal + ' ' + Fiat_Currency); - $('span[data-currency="BTCD"][id="header_coinfiatbalance"]').text(tmp_btcd_fiat_toal + ' ' + Fiat_Currency); + $('span[data-currency="BTC"][id="header_coinfiatbalance"]').text(tmp_btc_fiat_toal.toFixed(2) + ' ' + Fiat_Currency); + $('span[data-currency="BTCD"][id="header_coinfiatbalance"]').text(tmp_btcd_fiat_toal.toFixed(2) + ' ' + Fiat_Currency); }, error: function(xhr, textStatus, error) { diff --git a/index.html b/index.html index 0796ab7..74270df 100755 --- a/index.html +++ b/index.html @@ -264,7 +264,7 @@
-