diff --git a/assets/images/bg/btc_transparent_header_bg.png b/assets/images/bg/btc_transparent_header_bg.png new file mode 100644 index 0000000..19c834e Binary files /dev/null and b/assets/images/bg/btc_transparent_header_bg.png differ diff --git a/assets/images/cryptologo/GAME.png b/assets/images/cryptologo/GAME.png new file mode 100644 index 0000000..17ddaf4 Binary files /dev/null and b/assets/images/cryptologo/GAME.png differ diff --git a/assets/images/cryptologo/WIRELESS.png b/assets/images/cryptologo/WLC.png similarity index 100% rename from assets/images/cryptologo/WIRELESS.png rename to assets/images/cryptologo/WLC.png diff --git a/assets/images/cryptologo/gamerscoin.png b/assets/images/cryptologo/gamerscoin.png deleted file mode 100644 index 4546efd..0000000 Binary files a/assets/images/cryptologo/gamerscoin.png and /dev/null differ diff --git a/assets/images/native/btc_header_title_logo.png b/assets/images/native/btc_header_title_logo.png new file mode 100644 index 0000000..746a195 Binary files /dev/null and b/assets/images/native/btc_header_title_logo.png differ diff --git a/assets/js/kmdcli.js b/assets/js/kmdcli.js new file mode 100644 index 0000000..3ef8a4a --- /dev/null +++ b/assets/js/kmdcli.js @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2015 Satinderjit Singh + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + + /* + * Agama komodo-cli paths + * + */ + +var child_process = require('child_process'), + path = require('path'), + os = require('os'); + +if (os.platform() === 'darwin') { + var komodocliBin = path.join(__dirname, '../../../../../../../../assets/bin/osx/komodo-cli'), + zcashcliBin = '/Applications/ZCashSwingWalletUI.app/Contents/MacOS/zcash-cli'; +} + +if (os.platform() === 'linux') { + var komodocliBin = path.join(__dirname, '../../../../../../../../assets/bin/linux64/komodo-cli'); +} + +if (os.platform() === 'win32') { + var komodocliBin = path.join(__dirname, '../../../../../../../../assets/bin/win64/komodo-cli.exe'), + komodocliBin = path.normalize(komodocliBin); +} + +console.log(komodocliBin) + +/** + * The **komodo-cli** command is used to get komodo api calls answer. + * + * @private + * @category kmdcli + * + */ +var kmdcli = module.exports = { + exec: child_process.exec, + command: command +}; + +/** + * Parses komodo-cli commands. + * + * @private + * @static + * @category kmdcli + * @param {function} callback The callback function. + * + */ +function parse_kmdcli_commands(callback) { + return function(error, stdout, stderr) { + if (error) callback(error, stderr); + else callback(error, stdout); + //console.log(stdout) + }; +} + +/** + * Parses komodo-cli commands. + * + * @private + * @static + * @category kmdcli + * @param {function} callback The callback function. + * @example + * + * var kmdcli = require('./kmdcli'); + * + * kmdcli.command('getinfo', function(err, command) { + * console.log(command); + * }); + * + * // => + * { + * "version" : 1000550, + * "protocolversion" : 170002, + * "notarized" : 254740, + * "notarizedhash" : "01f4f1c46662ccca2e7fa9e7e38d4d2e4ced4402fa0f4fc116b8f004bb8cf272", + * "notarizedtxid" : "2b16e47a176f8c1886ca0268243f9b96f8b2db466ea26ae99873d5224bbf80b6", + * "walletversion" : 60000, + * "balance" : 32632.46167742, + * "interest" : 0.00478671, + * "blocks" : 254791, + * "longestchain" : 254791, + * "timeoffset" : 0, + * "tiptime" : 1490815616, + * "connections" : 8, + * "proxy" : "", + * "difficulty" : 707836.56791394, + * "testnet" : false, + * "keypoololdest" : 1482746526, + * "keypoolsize" : 101, + * "paytxfee" : 0.00000000, + * "relayfee" : 0.00001000, + * "errors" : "WARNING: check your network connection, 157 blocks received in the last 4 hours (240 expected)", + * "notaryid" : -1, + * "pubkey" : "000000000000000000000000000000000000000000000000000000000000000000" + * } + * + */ +function command(kmd_command, callback) { + if (callback) { + return this.exec(komodocliBin + " " + kmd_command, + parse_kmdcli_commands(callback)); + } +} diff --git a/assets/scripts/dashboard.js b/assets/scripts/dashboard.js index 4fa0a88..f117e88 100644 --- a/assets/scripts/dashboard.js +++ b/assets/scripts/dashboard.js @@ -665,9 +665,9 @@ var Dashboard = function() { coinlogo = 'franko'; coinname = 'Franko'; break; - case 'GMC': - coinlogo = 'gamerscoin'; - coinname = 'Gamerscoin'; + case 'GAME': + coinlogo = 'GAME'; + coinname = 'GameCredits'; break; case 'SUPERNET': coinlogo = 'SUPERNET'; @@ -677,8 +677,8 @@ var Dashboard = function() { coinlogo = 'REVS'; coinname = 'REVS'; break; - case 'WIRELESS': - coinlogo = 'WIRELESS'; + case 'WLC': + coinlogo = 'WLC'; coinname = 'WIRELESS'; break; case 'PANGEA': @@ -939,6 +939,13 @@ var Dashboard = function() { $('#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); + $('#addcoin_mdl_native_mode') + .prop('disabled', false) + .prop('checked', true); + $('#addcoin_mdl_full_mode').prop('disabled', true); + } }); } @@ -1078,7 +1085,7 @@ var Dashboard = function() { }); } - }, 1000); + }, 5000); var FetchBasiliskData = setInterval(function() { var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'), diff --git a/assets/scripts/iguana_api.js b/assets/scripts/iguana_api.js index 6c969ab..fbf3617 100644 --- a/assets/scripts/iguana_api.js +++ b/assets/scripts/iguana_api.js @@ -185,7 +185,7 @@ function Iguana_utxorawtx(data) { function checkAC(coinVal) { if (coinVal == 'SUPERNET' || coinVal == 'REVS' || - coinVal == 'WIRELESS' || + coinVal == 'WLC' || coinVal == 'DEX' || coinVal == 'PANGEA' || coinVal == 'JUMBLR' || @@ -199,6 +199,7 @@ function checkAC(coinVal) { coinVal == 'KV' || coinVal == 'CEAL' || coinVal == 'MESH' || + coinVal == 'BTC' || coinVal == 'USD' || coinVal == 'RON' || coinVal == 'EUR' || diff --git a/assets/scripts/iguana_api/IguanaAddcoin.js b/assets/scripts/iguana_api/IguanaAddcoin.js index c7a025d..50991bc 100644 --- a/assets/scripts/iguana_api/IguanaAddcoin.js +++ b/assets/scripts/iguana_api/IguanaAddcoin.js @@ -268,8 +268,8 @@ function Iguana_addcoin(addcoin_data) { AddCoinData = {'userpass':tmpIguanaRPCAuth,"RELAY":addcoin_data.mode,"VALIDATE":addcoin_data.mode,"startpend":tmpPendValue,"endpend":tmpPendValue,"prefetchlag":-1,"poll":10,"active":1,"agent":"iguana","method":"addcoin","maxpeers":256,"newcoin":"FRK","name":"Franko","netmagic":"7defaced","p2p":7912,"rpc":7913,"pubval":35,"p2shval":5,"wifval":163,"txfee_satoshis":"0","minconfirms":2,"genesishash":"19225ae90d538561217b5949e98ca4964ac91af39090d1a4407c892293e4f44f","genesis":{"hashalgo":"scrypt","version":1,"timestamp":1368144664,"nBits":"1e0ffff0","nonce":731837,"merkle_root":"b78f79f1d10029cc45ed3d5a1db7bd423d4ee170c03baf110a62565d16a21dca"},"alertpubkey":"04d4da7a5dae4db797d9b0644d57a5cd50e05a70f36091cd62e2fc41c98ded06340be5a43a35e185690cd9cde5d72da8f6d065b499b06f51dcfba14aad859f443a"} } - if ( addcoin_data.coin == 'GMC' ) { - logincoinfullname = 'Gamerscoin'; + if ( addcoin_data.coin == 'GAME' ) { + logincoinfullname = 'GameCredits'; if ( addcoin_data.mode == '1' ) { logincoinmodeinfo = 'Full'; @@ -278,7 +278,7 @@ function Iguana_addcoin(addcoin_data) { } var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); - AddCoinData = {'userpass':tmpIguanaRPCAuth,"RELAY":addcoin_data.mode,"VALIDATE":addcoin_data.mode,"startpend":tmpPendValue,"endpend":tmpPendValue,"services":129,"prefetchlag":-1,"poll":10,"active":1,"agent":"iguana","method":"addcoin","maxpeers":256,"newcoin":"GMC","name":"GameCredits","netmagic":"fbc0b6db","p2p":40002,"rpc":40001,"pubval":38,"p2shval":5,"wifval":166,"txfee_satoshis":"100000","minconfirms":2,"genesishash":"91ec5f25ee9a0ffa1af7d4da4db9a552228dd2dc77cdb15b738be4e1f55f30ee","genesis":{"hashalgo":"scrypt","version":1,"timestamp":1392757140,"nBits":"1e0ffff0","nonce":2084565393,"merkle_root":"d849db99a14164f4b4c8ad6d2d8d7e2b1ba7f89963e9f4bf9fad5ff1a4754429"},"alertpubkey":"04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284","auxpow":1,"protover":80006,"isPoS":0} + AddCoinData = {'userpass':tmpIguanaRPCAuth,"RELAY":addcoin_data.mode,"VALIDATE":addcoin_data.mode,"startpend":tmpPendValue,"endpend":tmpPendValue,"services":129,"prefetchlag":-1,"poll":10,"active":1,"agent":"iguana","method":"addcoin","maxpeers":256,"newcoin":"GAME","name":"GameCredits","netmagic":"fbc0b6db","p2p":40002,"rpc":40001,"pubval":38,"p2shval":5,"wifval":166,"txfee_satoshis":"100000","minconfirms":2,"genesishash":"91ec5f25ee9a0ffa1af7d4da4db9a552228dd2dc77cdb15b738be4e1f55f30ee","genesis":{"hashalgo":"scrypt","version":1,"timestamp":1392757140,"nBits":"1e0ffff0","nonce":2084565393,"merkle_root":"d849db99a14164f4b4c8ad6d2d8d7e2b1ba7f89963e9f4bf9fad5ff1a4754429"},"alertpubkey":"04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284","auxpow":1,"protover":80006,"isPoS":0} } if ( checkCoinType() === 'ac' ) { @@ -331,11 +331,11 @@ function Iguana_addcoin(addcoin_data) { 'AddCoinData': confpath ? Object.assign({}, _acPayloadOrigin, {"coin":"REVS","conf":"REVS.conf","path":confpath[0].path,"RELAY":-1,"VALIDATE":0,"startpend":4,"endpend":4,"maxpeers":8,"newcoin":"REVS","name":"REVS","netmagic":"905c3498","p2p":10195,"rpc":10196}) : {}, 'AddCoinDataVar': Object.assign({}, _acPayloadOrigin, {'userpass':tmpIguanaRPCAuth,"RELAY":addcoin_data.mode,"VALIDATE":addcoin_data.mode,"startpend":tmpPendValue,"endpend":tmpPendValue,"maxpeers":8,"newcoin":"REVS","name":"REVS","netmagic":"905c3498","p2p":10195,"rpc":10196}) }, - 'WIRELESS': { + 'WLC': { 'name': 'WIRELESS', - 'supply': 21000000, - 'AddCoinData': confpath ? Object.assign({}, _acPayloadOrigin, {"coin":"WIRELESS","conf":"WIRELESS.conf","path":confpath[0].path,"RELAY":-1,"VALIDATE":0,"startpend":4,"endpend":4,"maxpeers":8,"newcoin":"WIRELESS","name":"WIRELESS","netmagic":"62071ed3","p2p":11666,"rpc":11667}) : {}, - 'AddCoinDataVar': Object.assign({}, _acPayloadOrigin, {'userpass':tmpIguanaRPCAuth,"RELAY":addcoin_data.mode,"VALIDATE":addcoin_data.mode,"startpend":tmpPendValue,"endpend":tmpPendValue,"maxpeers":8,"newcoin":"WIRELESS","name":"WIRELESS","netmagic":"62071ed3","p2p":11666,"rpc":11667}) + 'supply': 210000000, + 'AddCoinData': confpath ? Object.assign({}, _acPayloadOrigin, {"coin":"WLC","conf":"WLC.conf","path":confpath[0].path,"RELAY":-1,"VALIDATE":0,"startpend":4,"endpend":4,"maxpeers":8,"newcoin":"WLC","name":"WIRELESS","netmagic":"62071ed3","p2p":11666,"rpc":11667}) : {}, + 'AddCoinDataVar': Object.assign({}, _acPayloadOrigin, {'userpass':tmpIguanaRPCAuth,"RELAY":addcoin_data.mode,"VALIDATE":addcoin_data.mode,"startpend":tmpPendValue,"endpend":tmpPendValue,"maxpeers":8,"newcoin":"WLC","name":"WIRELESS","netmagic":"62071ed3","p2p":11666,"rpc":11667}) }, 'PANGEA': { 'name': 'PANGEA', @@ -508,7 +508,7 @@ function Iguana_addcoin(addcoin_data) { addcoin_data.coin === 'KV' || addcoin_data.coin === 'CEAL' || addcoin_data.coin === 'MESH' || - addcoin_data.coin === 'WIRELESS') { + addcoin_data.coin === 'WLC') { return 'ac'; } } diff --git a/assets/scripts/kmd_wallet/KMDInit.js b/assets/scripts/kmd_wallet/KMDInit.js index 890d484..45f5492 100644 --- a/assets/scripts/kmd_wallet/KMDInit.js +++ b/assets/scripts/kmd_wallet/KMDInit.js @@ -15,155 +15,157 @@ function RunKMDInitFunctions() { }); NProgress.start(); - var check1 = CheckIfConnected(); - console.log(check1[0]); - if ( check1[0] == 'not active' ) { - console.log('Could not connect to external wallet. Is external wallet running?'); - toastr.error(_lang[defaultLang].TOASTR.KMD_NATIVE_CON_ERROR, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); - $('#extcoin-wallet').hide(); - $('#extcoin-wallet-connection-alert').show(); - } - if ( check1[0] == 'null return' ) { - console.log('Could not connect to external wallet. Is iguana connected to external wallet?'); - toastr.error(_lang[defaultLang].TOASTR.KMD_IGUANA_CON_ERROR, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); - $('#extcoin-wallet').hide(); - $('#extcoin-wallet-connection-alert').show(); - } - if ( check1[0] == 'activating' ) { - $('#extcoin-wallet-activating-alert').show(); - $('#extcoin-wallet').show(); - $('#extcoin-wallet-connection-alert').hide(); - - function _getKMDInfo() { - var passthru_agent = getPassthruAgent(), - tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), - ajax_data = { - 'userpass': tmpIguanaRPCAuth, - 'agent': passthru_agent, - 'method': 'passthru', - 'function': 'getinfo', - 'hex': '' - }; - - console.log(ajax_data); - $.ajax({ - type: 'POST', - data: JSON.stringify(ajax_data), - url: 'http://127.0.0.1:' + config.iguanaPort, - success: function(data, textStatus, jqXHR) { - var AjaxOutputData = JSON.parse(data); - - if (AjaxOutputData && !AjaxOutputData.blocks) { - startBestBlockInterval(); - } else { - clearInterval(currentBestBlockInterval); - } - }, - error: function(xhr, textStatus, error) { - console.log('failed getting Coin History.'); - console.log(xhr.statusText); - if ( xhr.readyState == 0 ) { - Iguana_ServiceUnavailable(); - } - console.log(textStatus); - console.log(error); - } - }); + function _RunKMDInitFunctions(check1) { + console.log(check1[0]); + if ( check1[0] == 'not active' ) { + console.log('Could not connect to external wallet. Is external wallet running?'); + toastr.error(_lang[defaultLang].TOASTR.KMD_NATIVE_CON_ERROR, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); + $('#extcoin-wallet').hide(); + $('#extcoin-wallet-connection-alert').show(); + } + if ( check1[0] == 'null return' ) { + console.log('Could not connect to external wallet. Is iguana connected to external wallet?'); + toastr.error(_lang[defaultLang].TOASTR.KMD_IGUANA_CON_ERROR, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); + $('#extcoin-wallet').hide(); + $('#extcoin-wallet-connection-alert').show(); } + if ( check1[0] == 'activating' ) { + $('#extcoin-wallet-activating-alert').show(); + $('#extcoin-wallet').show(); + $('#extcoin-wallet-connection-alert').hide(); + + function _getKMDInfo() { + var passthru_agent = getPassthruAgent(), + tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), + ajax_data = { + 'userpass': tmpIguanaRPCAuth, + 'agent': passthru_agent, + 'method': 'passthru', + 'function': 'getinfo', + 'hex': '' + }; + + console.log(ajax_data); + $.ajax({ + type: 'POST', + data: JSON.stringify(ajax_data), + url: 'http://127.0.0.1:' + config.iguanaPort, + success: function(data, textStatus, jqXHR) { + var AjaxOutputData = JSON.parse(data); + + if (AjaxOutputData && !AjaxOutputData.blocks) { + startBestBlockInterval(); + } else { + clearInterval(currentBestBlockInterval); + } + }, + error: function(xhr, textStatus, error) { + console.log('failed getting Coin History.'); + console.log(xhr.statusText); + if ( xhr.readyState == 0 ) { + Iguana_ServiceUnavailable(); + } + console.log(textStatus); + console.log(error); + } + }); + } - function getRemoteCurrentHeight() { - var extcoin = $('[data-extcoin]').attr('data-extcoin'); + function getRemoteCurrentHeight() { + var extcoin = $('[data-extcoin]').attr('data-extcoin'); - $.ajax({ - type: 'GET', - url: 'http://localhost:' + config.iguanaPort + '/api/dex/getinfo?userpass=tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth') + '&symbol=' + extcoin, - success: function(data, textStatus, jqXHR) { - data = JSON.parse(data); + $.ajax({ + type: 'GET', + url: 'http://localhost:' + config.iguanaPort + '/api/dex/getinfo?userpass=tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth') + '&symbol=' + extcoin, + success: function(data, textStatus, jqXHR) { + data = JSON.parse(data); - if (data && data.blocks) { - totalBlocksInExplorer = data.blocks; + if (data && data.blocks) { + totalBlocksInExplorer = data.blocks; + } + }, + error: function(xhr, textStatus, error) { + console.log('failed getinfo from dex api'); + console.log(xhr.statusText); + console.log(textStatus); + console.log(error); } - }, - error: function(xhr, textStatus, error) { - console.log('failed getinfo from dex api'); - console.log(xhr.statusText); - console.log(textStatus); - console.log(error); - } - }); - } - - var currentBestBlockInterval; - function startBestBlockInterval() { - currentBestBlockInterval = setInterval(function() { - if (!chainActivationLastUpdate || checkTimestamp(chainActivationLastUpdate) > chainActivationLastUpdateTimeout) { - $.ajax({ - type: 'POST', - data: { - 'herdname': 'komodo', - 'lastLines': 1 - }, - url: 'http://127.0.0.1:17777/shepherd/debuglog', - success: function(data, textStatus, jqXHR) { - if (data.indexOf('UpdateTip') > -1) { - var temp = data.split(' '); - - for (var i = 0; i < temp.length; i++) { - if (temp[i].indexOf('height=') > -1) { - var currentBestChain = temp[i].replace('height=', ''); - $('#activating-komodod-tridot').hide(); - $('#activating-komodod-progress').html(': ' + Math.floor(currentBestChain * 100 / totalBlocksInExplorer) + '% (blocks ' + currentBestChain + ' / ' + totalBlocksInExplorer + ')'); - chainActivationLastUpdate = Date.now(); - if (currentBestChain === totalBlocksInExplorer) { - clearInterval(currentBestBlockInterval); + }); + } + + var currentBestBlockInterval; + function startBestBlockInterval() { + currentBestBlockInterval = setInterval(function() { + if (!chainActivationLastUpdate || checkTimestamp(chainActivationLastUpdate) > chainActivationLastUpdateTimeout) { + $.ajax({ + type: 'POST', + data: { + 'herdname': 'komodo', + 'lastLines': 1 + }, + url: 'http://127.0.0.1:17777/shepherd/debuglog', + success: function(data, textStatus, jqXHR) { + if (data.indexOf('UpdateTip') > -1) { + var temp = data.split(' '); + + for (var i = 0; i < temp.length; i++) { + if (temp[i].indexOf('height=') > -1) { + var currentBestChain = temp[i].replace('height=', ''); + $('#activating-komodod-tridot').hide(); + $('#activating-komodod-progress').html(': ' + Math.floor(currentBestChain * 100 / totalBlocksInExplorer) + '% (blocks ' + currentBestChain + ' / ' + totalBlocksInExplorer + ')'); + chainActivationLastUpdate = Date.now(); + if (currentBestChain === totalBlocksInExplorer) { + clearInterval(currentBestBlockInterval); + } } } } + }, + error: function(xhr, textStatus, error) { + console.log('failed getting debug.log'); + console.log(xhr.statusText); + console.log(textStatus); + console.log(error); } - }, - error: function(xhr, textStatus, error) { - console.log('failed getting debug.log'); - console.log(xhr.statusText); - console.log(textStatus); - console.log(error); - } - }); - } - }, 2000); - } - - if (sessionStorage.getItem('edexTmpMode') === 'Native') { - getRemoteCurrentHeight(); + }); + } + }, 5000); + } - var totalBlocksInExplorer = 0, - totalBlocksInExplorerInterval = setInterval(function() { + if (sessionStorage.getItem('edexTmpMode') === 'Native') { getRemoteCurrentHeight(); - _getKMDInfo(); - }, 60000); - } else { - clearInterval(totalBlocksInExplorerInterval); - clearInterval(currentBestBlockInterval); + + var totalBlocksInExplorer = 0, + totalBlocksInExplorerInterval = setInterval(function() { + getRemoteCurrentHeight(); + _getKMDInfo(); + }, 60000); + } else { + clearInterval(totalBlocksInExplorerInterval); + clearInterval(currentBestBlockInterval); + } + + $('#kmd_wallet_dashoard_section').show(); + $('#kmd_wallet_dashboardinfo').show(); + $('#kmd_wallet_send').hide(); + $('#kmd_wallet_recieve_section').hide(); + $('#kmd_wallet_settings').hide(); + } + if ( check1[0] == 'connected') { + getTotalKMDBalance(); + KMDfillTxHistoryT(); + $('#extcoin-wallet').show(); + $('#extcoin-wallet-connection-alert').hide(); + + $('#kmd_wallet_dashoard_section').show(); + $('#kmd_wallet_dashboardinfo').show(); + $('#kmd_wallet_send').hide(); + $('#kmd_wallet_recieve_section').hide(); + $('#kmd_wallet_settings').hide(); } - $('#kmd_wallet_dashoard_section').show(); - $('#kmd_wallet_dashboardinfo').show(); - $('#kmd_wallet_send').hide(); $('#kmd_wallet_recieve_section').hide(); - $('#kmd_wallet_settings').hide(); + NProgress.done(); } - if ( check1[0] == 'connected') { - getTotalKMDBalance(); - KMDfillTxHistoryT(); - $('#extcoin-wallet').show(); - $('#extcoin-wallet-connection-alert').hide(); - - $('#kmd_wallet_dashoard_section').show(); - $('#kmd_wallet_dashboardinfo').show(); - $('#kmd_wallet_send').hide(); - $('#kmd_wallet_recieve_section').hide(); - $('#kmd_wallet_settings').hide(); - } - - $('#kmd_wallet_recieve_section').hide(); - NProgress.done(); + CheckIfConnected(_RunKMDInitFunctions); } \ No newline at end of file diff --git a/assets/scripts/kmd_wallet_dashboard.js b/assets/scripts/kmd_wallet_dashboard.js index 787f155..290ec55 100644 --- a/assets/scripts/kmd_wallet_dashboard.js +++ b/assets/scripts/kmd_wallet_dashboard.js @@ -55,7 +55,7 @@ function getPassthruAgent() { return passthru_agent; } -function CheckIfConnected() { +function CheckIfConnected(cb) { var result = [], extcoin = $('[data-extcoin]').attr('data-extcoin'), passthru_agent = getPassthruAgent(), @@ -82,7 +82,6 @@ function CheckIfConnected() { console.log(ajax_data); $.ajax({ - async: false, type: 'POST', data: JSON.stringify(ajax_data), url: 'http://127.0.0.1:' + config.iguanaPort, @@ -98,6 +97,8 @@ function CheckIfConnected() { } else { result.push(AjaxOutputData.errors); } + + cb.call(this, result); }, error: function(xhr, textStatus, error) { console.log('failed getting Coin History.'); @@ -107,12 +108,15 @@ function CheckIfConnected() { } console.log(textStatus); console.log(error); + + cb.call(this, result); } }); return result; } +// TODO: this func is not used anywhere function CheckIfWalletEncrypted() { var result = [], passthru_agent = getPassthruAgent(), @@ -168,7 +172,7 @@ function CheckIfWalletEncrypted() { return result; } -function KMD_getInfo_rtrn() { +function KMD_getInfo_rtrn(cb) { var result = [], extcoin = $('[data-extcoin]').attr('data-extcoin'), passthru_agent = getPassthruAgent(), @@ -195,7 +199,6 @@ function KMD_getInfo_rtrn() { } $.ajax({ - async: false, type: 'POST', data: JSON.stringify(ajax_data), url: 'http://127.0.0.1:' + config.iguanaPort, @@ -211,6 +214,8 @@ function KMD_getInfo_rtrn() { } else { result.push(AjaxOutputData.errors); } + + cb.call(this, result[0]); }, error: function(xhr, textStatus, error) { console.log('failed getting Coin History.'); @@ -220,6 +225,7 @@ function KMD_getInfo_rtrn() { } console.log(textStatus); console.log(error); + cb.call(this, result); } }); @@ -228,29 +234,32 @@ function KMD_getInfo_rtrn() { function KMD_ProgressBar() { var result = [], - extcoin = $('[data-extcoin]').attr('data-extcoin'), - getinfotmp = KMD_getInfo_rtrn(); - - if (extcoin !== 'ZEC') { - if ( getinfotmp == 'activating') { - $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(_lang[defaultLang].INDEX.ACTIVATING + '...'); - } else { - if (getinfotmp.blocks === 0) { - $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No blocks'); - $('#extcoin-progressbars .progress-bar').css({ 'width': '100%' }); - } else if (getinfotmp.blocks > 0 && getinfotmp.longestchain === 0) { - $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No longestchain'); - $('#extcoin-progressbars .progress-bar').css({ 'width': '100%' }); + extcoin = $('[data-extcoin]').attr('data-extcoin'); + + KMD_getInfo_rtrn(_KMD_ProgressBar); + + function _KMD_ProgressBar(getinfotmp) { + if (extcoin !== 'ZEC') { + if ( getinfotmp == 'activating') { + $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(_lang[defaultLang].INDEX.ACTIVATING + '...'); } else { - var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100) / parseInt(getinfotmp.longestchain, 10); - console.log('getinfotmp', getinfotmp); - $('div[data-extcoin="' + extcoin + '"][id="extcoin-sync"]').width(parseFloat(sync_percent).toFixed(2) + '%'); - $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(parseFloat(sync_percent).toFixed(2) + '%'); - $('span[data-extcoin="' + extcoin + '"][id="extcoin-synced-blocks"]').text(getinfotmp.blocks); - $('span[data-extcoin="' + extcoin + '"][id="extcoin-longestchain"]').text(getinfotmp.longestchain); - $('span[data-extcoin="' + extcoin + '"][id="extcoin-connections"]').text(getinfotmp.connections); + if (getinfotmp.blocks === 0) { + $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No blocks'); + $('#extcoin-progressbars .progress-bar').css({ 'width': '100%' }); + } else if (getinfotmp.blocks > 0 && getinfotmp.longestchain === 0) { + $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No longestchain'); + $('#extcoin-progressbars .progress-bar').css({ 'width': '100%' }); + } else { + var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100) / parseInt(getinfotmp.longestchain, 10); + console.log('getinfotmp', getinfotmp); + $('div[data-extcoin="' + extcoin + '"][id="extcoin-sync"]').width(parseFloat(sync_percent).toFixed(2) + '%'); + $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(parseFloat(sync_percent).toFixed(2) + '%'); + $('span[data-extcoin="' + extcoin + '"][id="extcoin-synced-blocks"]').text(getinfotmp.blocks); + $('span[data-extcoin="' + extcoin + '"][id="extcoin-longestchain"]').text(getinfotmp.longestchain); + $('span[data-extcoin="' + extcoin + '"][id="extcoin-connections"]').text(getinfotmp.connections); + } + $('#extcoin-wallet-activating-alert').hide(); } - $('#extcoin-wallet-activating-alert').hide(); } } } \ No newline at end of file diff --git a/assets/scripts/login.js b/assets/scripts/login.js index 28708b6..11bf825 100644 --- a/assets/scripts/login.js +++ b/assets/scripts/login.js @@ -706,7 +706,7 @@ var Login = function() { } if (tmp_coin_val == 'SUPERNET' || tmp_coin_val == 'REVS' || - tmp_coin_val == 'WIRELESS' || + tmp_coin_val == 'WLC' || tmp_coin_val == 'DEX' || tmp_coin_val == 'PANGEA' || tmp_coin_val == 'JUMBLR' || diff --git a/assets/scripts/sidebar.js b/assets/scripts/sidebar.js index 58fa0b0..cb612b7 100644 --- a/assets/scripts/sidebar.js +++ b/assets/scripts/sidebar.js @@ -436,8 +436,8 @@ function assetchain_pax_menu_actions(coin) { case 'REVS': renderAssetGFX('supernet', 'jumblr', coin); break; - case 'WIRELESS': - renderAssetGFX('wireless', 'wireless', coin); + case 'WLC': + renderAssetGFX('wireless', 'wireless', 'Wireless (WLC)'); break; case 'PANGEA': renderAssetGFX('pangea', 'jumblr', coin); @@ -449,7 +449,7 @@ function assetchain_pax_menu_actions(coin) { renderAssetGFX('supernet', 'jumblr', coin); break; case 'BET': - renderAssetGFX('wireless', 'wireless', coin); + renderAssetGFX('bet', 'bet', coin); break; case 'CRYPTO': renderAssetGFX('supernet', 'jumblr', coin); @@ -458,7 +458,7 @@ function assetchain_pax_menu_actions(coin) { renderAssetGFX('supernet', 'jumblr', coin); break; case 'SHARK': - renderAssetGFX('wireless', 'wireless', coin); + renderAssetGFX('shark', 'shark', coin); break; case 'BOTS': renderAssetGFX('supernet', 'jumblr', coin); @@ -476,7 +476,10 @@ function assetchain_pax_menu_actions(coin) { renderAssetGFX('ceal', 'ceal', coin); break; case 'MESH': - renderAssetGFX('mesh', 'mesh', coin); + renderAssetGFX('mesh', 'mesh', 'SuperMesh (MESH)'); + break; + case 'BTC': + renderAssetGFX('btc', 'btc', '(BTC)'); break; case 'USD': renderAssetGFX('usd', 'usd', 'US Dollar (USD)'); @@ -610,9 +613,9 @@ function applyKMDWalletStyle() { 'background-repeat': 'no-repeat', 'background-position': '0%' }); + $('#easydex_kmd_wallet_actions_header').show(); $( '#easydex_acpax_wallet_actions_header,' + - '#easydex_kmd_wallet_actions_header,' + '#easydex_zec_wallet_actions_header,' + '#jumblr_actions_header,' + '#easydex_btc_btcd_balances_header' diff --git a/assets/scripts/templates/addCoinOptions.js b/assets/scripts/templates/addCoinOptions.js index de40cf3..c44716c 100644 --- a/assets/scripts/templates/addCoinOptions.js +++ b/assets/scripts/templates/addCoinOptions.js @@ -9,7 +9,7 @@ templates.addCoinOptions = - + @@ -34,7 +34,7 @@ templates.addCoinOptions = - + diff --git a/assets/scripts/templates/bottomIncludes.js b/assets/scripts/templates/bottomIncludes.js index 9a81a9f..161a99f 100644 --- a/assets/scripts/templates/bottomIncludes.js +++ b/assets/scripts/templates/bottomIncludes.js @@ -126,7 +126,12 @@ templates.bottomIncludes = socket.on('messages', function(data) { console.log(data); }); - + socket.on('service', function(data) { + console.log('service', data); + if (data.komodod && data.komodod.error === 'start error') { + toastr.error(_lang[defaultLang].TOASTR.KOMODO_ERR, _lang[defaultLang].TOASTR.SERVICE_NOTIFICATION + '.'); + } + }); lang(); }); })(document, window, jQuery); diff --git a/assets/scripts/walletsettings.js b/assets/scripts/walletsettings.js index d84d104..890b786 100644 --- a/assets/scripts/walletsettings.js +++ b/assets/scripts/walletsettings.js @@ -66,20 +66,20 @@ var WalletSettings = function() { var EncryptWalletDataOutput = JSON.parse(data); console.log(EncryptWalletDataOutput[wifkey_coin_handle + 'wif']); - WifKeyDivContent += ''; - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '
' + - '' + wifkey_coin_handle + '' + - '' + EncryptWalletDataOutput[wifkey_coin_handle] + '
' + - '' + wifkey_coin_handle + 'Wif' + - '' + EncryptWalletDataOutput[wifkey_coin_handle + 'wif'] + '
'; + var WifKeyDivContent = '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '
' + + '' + wifkey_coin_handle + '' + + '' + EncryptWalletDataOutput[wifkey_coin_handle] + '
' + + '' + wifkey_coin_handle + 'Wif' + + '' + EncryptWalletDataOutput[wifkey_coin_handle + 'wif'] + '
'; $('#wif-priv-keys').html(WifKeyDivContent); }, error: function(xhr, textStatus, error) { diff --git a/index.html b/index.html index baac3a6..6cb847a 100755 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - Agama - EasyDEX (v0.1.6.0e-beta) + Agama - EasyDEX (v0.1.6.1e-beta) @@ -58,6 +58,8 @@ + +