diff --git a/assets/scripts/atomicexplorer.js b/assets/scripts/atomicexplorer.js
index 67eda89..9419728 100644
--- a/assets/scripts/atomicexplorer.js
+++ b/assets/scripts/atomicexplorer.js
@@ -11,7 +11,7 @@ var AtomicExplorer = function() {
'hideEasing': 'linear',
'showMethod': 'fadeIn',
'hideMethod': 'fadeOut'
- }
+ };
var handleExplorer = function() {
$('#atomic_explorer_getcoinpeers_btn').click(function() {
@@ -23,7 +23,7 @@ var AtomicExplorer = function() {
''
});
NProgress.start();
- console.log("button pushed in atomic explorer");
+ console.log('button pushed in atomic explorer');
var atomic_explorer_select_coin_val = $('select[id=\'atomic_explorer_select_coin_options\']').val(),
atomic_explorer_select_command_val = $('select[id=\'atomic_explorer_select_command_options\']').val(),
@@ -326,7 +326,7 @@ var AtomicExplorer = function() {
}
if (ExplorerOutputData.error === 'less than required responses') {
- toastr.error('Less than required responses. Please try again.', 'Basilisk Notification')
+ toastr.error(_lang[defaultLang].DASHBOARD.LESS_RESPONSES_REQ, _lang[defaultLang].DASHBOARD.BASILISC_NOTIFICATION)
}
NProgress.done();
diff --git a/assets/scripts/coinwallets.js b/assets/scripts/coinwallets.js
index a6330a8..a5b2790 100644
--- a/assets/scripts/coinwallets.js
+++ b/assets/scripts/coinwallets.js
@@ -46,6 +46,7 @@ function sendCurrency(val) {
'agent': 'bitcoinrpc',
'method': 'getinfo'
};
+
$.ajax({
type: 'POST',
data: JSON.stringify(getinfoValues),
@@ -65,7 +66,6 @@ function sendCurrency(val) {
console.log(error);
}
});
-
}
function ReceiveCurrency(rec_val) {
@@ -87,12 +87,12 @@ function ReceiveCurrency(rec_val) {
}
var clipboard = new Clipboard('.btn');
- clipboard.on('success', function(e) {
- console.log(e);
- });
- clipboard.on('error', function(e) {
- console.log(e);
- });
+ clipboard.on('success', function(e) {
+ console.log(e);
+ });
+ clipboard.on('error', function(e) {
+ console.log(e);
+ });
}
$('#mdl_currency_amount').keyup(function() {
@@ -115,7 +115,7 @@ $('#mdl_currency_amount').keyup(function() {
//console.log($('#mdl_currency_amount').val());
//console.log(total_of_currency_fiat);
$('#mdl_currency_total_value').text(total_of_currency_fee.toFixed(8));
- $('#mdl_currency_total_fiat_value').text(fiat_symbol+total_of_currency_fiat.toFixed(2));
+ $('#mdl_currency_total_fiat_value').text(fiat_symbol + total_of_currency_fiat.toFixed(2));
if ($('#mdl_currency_amount').val() != '' && $('#mdl_currency_sendto') != '' && $('#mdl_currency_fee') != '' ) {
mdl_send_btn.removeClass('disabled');
@@ -225,17 +225,16 @@ function ExecuteSendCurrencyAPI() {
console.log('== Data OutPut ==');
console.log(SendToAddrData);
-
if ( SendToAddrData.error != 'couldnt create rawtx' ) {
- SendToAddrTxDataTitle = 'Transaction Failed';
+ SendToAddrTxDataTitle = _lang[defaultLang].COIN_WALLETS.TX_FAILED;
}
if ( SendToAddrData.sendrawtransaction == 'success' ) {
- SendToAddrTxDataTitle = 'Transaction Successful';
+ SendToAddrTxDataTitle = _lang[defaultLang].COIN_WALLETS.TX_SUCCESS;
}
var SentToAddrTxData = '' +
'' +
- 'Transaction ID:'
+ '' + _lang[defaultLang].COIN_WALLETS.TX + ' ID:'
'' +
SendToAddrData.result +
'';
@@ -245,7 +244,7 @@ function ExecuteSendCurrencyAPI() {
});
if ( SendToAddrData.sendrawtransaction == 'success' ) {
- toastr.success('Transaction Sent', 'Transaction Notification')
+ toastr.success(_lang[defaultLang].TOASTR.TX_SENT, _lang[defaultLang].TOASTR.TX_NOTIFICATION);
}
},
error: function(xhr, textStatus, error) {
@@ -253,7 +252,7 @@ function ExecuteSendCurrencyAPI() {
console.log(xhr.statusText);
console.log(textStatus);
console.log(error);
- toastr.error('Unable to complete transaction', 'Transaction Notification')
+ toastr.error(_lang[defaultLang].TOASTR.TX_SEND_ERR, _lang[defaultLang].TOASTR.TX_NOTIFICATION);
}
});
@@ -288,14 +287,14 @@ function WalletFiatCurrency(fiat_currency_value) {
function Iguana_rmd160conv(rmd160conv_data) {
// comment
- var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth');
- var ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': 'SuperNET',
- 'method': 'rmd160conv',
- 'rmd160': rmd160conv_data.rmd160,
- 'coin': rmd160conv_data.coin
- };
+ var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
+ ajax_data = {
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': 'SuperNET',
+ 'method': 'rmd160conv',
+ 'rmd160': rmd160conv_data.rmd160,
+ 'coin': rmd160conv_data.coin
+ };
console.log(ajax_data);
$.ajax({
diff --git a/assets/scripts/dashboard.js b/assets/scripts/dashboard.js
index d960bfa..6be7749 100644
--- a/assets/scripts/dashboard.js
+++ b/assets/scripts/dashboard.js
@@ -154,12 +154,11 @@ var Dashboard = function() {
edexcoin_addr_list_with_balance = result
console.log(edexcoin_addr_list_with_balance);
var tmpoptions = '';
- tmpoptions += '';
+ tmpoptions += '';
$.each(edexcoin_addr_list_with_balance, function(index) {
tmpoptions += '';
$('#edexcoin_send_from').html(tmpoptions);
});
- lang();
$('.showedexcoinaddrs').selectpicker({ style: 'btn-info' });
$('.showedexcoinaddrs').selectpicker('refresh');
@@ -188,7 +187,7 @@ var Dashboard = function() {
});
$('#edexcoin_send_from').change(function() {
- if ($('#edexcoin_send_from').val() !== '' || $('#edexcoin_send_from').val() !== '- Select Address -') {
+ if ($('#edexcoin_send_from').val() !== '' || $('#edexcoin_send_from').val() !== _lang[defaultLang].DASHBOARD.SELECT_ADDRESS) {
$('.edexcoin_send_coins_btn_step1').removeClass('disabled');
$('.edexcoin_send_coins_btn_step1').prop('disabled', false);
@@ -201,16 +200,20 @@ var Dashboard = function() {
if (!('refresh' in query[active_edexcoin][coin_addr])) {
console.log(active_edexcoin + '>>>' + coin_addr + ' => refresh not found.')
- var call_data = {"allcoins": false,"coin":active_edexcoin,"calls":"refresh"}
- Shepherd_FetchBasiliskData(call_data).then(function(result){
- console.log(result)
- })
+ var call_data = {
+ 'allcoins': false,
+ 'coin': active_edexcoin,
+ 'calls': 'refresh'
+ };
+ Shepherd_FetchBasiliskData(call_data).then(function(result) {
+ console.log(result);
+ });
} else {
- console.log(query[active_edexcoin][coin_addr].refresh.status)
+ console.log(query[active_edexcoin][coin_addr].refresh.status);
}
})
}
- if ($('#edexcoin_send_from').val() === '' || $('#edexcoin_send_from').val() === '- Select Address -') {
+ if ($('#edexcoin_send_from').val() === '' || $('#edexcoin_send_from').val() === _lang[defaultLang].DASHBOARD.SELECT_ADDRESS) {
$('.edexcoin_send_coins_btn_step1').addClass(' disabled');
$('.edexcoin_send_coins_btn_step1').prop('disabled', true);
}
@@ -233,8 +236,6 @@ var Dashboard = function() {
//console.log($('#edexcoin_amount').val());
$('#edexcoin_total_value').text(total_minus_currency_fee.toFixed(8));
-
-
});
edexcoin_send_form_validator = $('.edexcoin-send-form').validate({
@@ -261,19 +262,19 @@ var Dashboard = function() {
messages: {
edexcoin_send_from: {
- required: 'From Address is required.'
+ required: _lang[defaultLang].DASHBOARD.SEND_FROMADDR_REQ
},
edexcoin_sendto: {
- required: 'To Address is required.'
+ required: _lang[defaultLang].DASHBOARD.SEND_TOADDR_REQ
},
edexcoin_amount: {
- required: 'Please enter amount to send.'
+ required: _lang[defaultLang].DASHBOARD.SEND_AMOUNT_REQ
},
edexcoin_fee: {
- required: 'Make sure you have fee entered. Default value is 0.0001.'
+ required: _lang[defaultLang].DASHBOARD.SEND_FEE_REQ + ' 0.0001.'
},
edexcoin_total_value: {
- required: 'Make sure you have both amount and fee entered to calculate final total.'
+ required: _lang[defaultLang].DASHBOARD.SEND_TOTAL_REQ
}
},
@@ -318,6 +319,7 @@ var Dashboard = function() {
tmp_send_from_addr = $('#edexcoin_send_from').val()
tmp_send_to_addr = $('#edexcoin_sendto').val(),
tmp_send_total_amount = $('#edexcoin_total_value').text();
+
$('#edexcoin-send-screen').hide();
$('#edexcoin-send-confirm-screen').show();
$('#edexcoin_send_step_1').removeClass( 'current' ).addClass( '' );
@@ -334,9 +336,10 @@ var Dashboard = function() {
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'),
tmp_send_from_addr = $('#edexcoin_send_from').val()
tmp_send_to_addr = $('#edexcoin_sendto').val(),
- tmp_send_total_amount = $('#edexcoin_total_value').text();
- tmp_send_fee = $('#edexcoin_fee').val()
- tmp_sendflag = $('#edexcoin_send_sig').is(":checked")
+ tmp_send_total_amount = $('#edexcoin_total_value').text(),
+ tmp_send_fee = $('#edexcoin_fee').val(),
+ tmp_sendflag = $('#edexcoin_send_sig').is(":checked");
+
console.log(active_edexcoin);
console.log(tmp_send_from_addr);
console.log(tmp_send_to_addr);
@@ -346,8 +349,8 @@ var Dashboard = function() {
var edexcoin_sendto_result_tbl = '';
edexcoin_sendto_result_tbl += '
' +
- 'Info | ' +
- 'The transaction submitted is processing. Once processed the transaction details will be displayed here. | ' +
+ '' + _lang[defaultLang].INDEX.INFO + ' | ' +
+ '' + _lang[defaultLang].DASHBOARD.SEND_TX_PROGRESS + ' | ' +
'
';
$('#edexcoin_sendto_result tbody').html(edexcoin_sendto_result_tbl);
$('#edexcoin_send_coins_anothertx_btn').hide();
@@ -445,7 +448,7 @@ var Dashboard = function() {
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
console.log('get new T address button clicked...');
EdexListAllAddr(active_edexcoin);
- toastr.info('Receiving Address list updated', 'Wallet Notification');
+ toastr.info(_lang[defaultLang].TOASTR.RECADDR_UPDATED, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION);
});
};
@@ -612,8 +615,8 @@ var Dashboard = function() {
walletDivContent += '';
$('.wallet-widgets-row').html(walletDivContent);
- $('.scrollbar-dynamic').scrollbar(); //Make sure widget-body has scrollbar for transactions history
- $('[data-toggle="tooltip"]').tooltip(); //Make sure tooltips are working for wallet widgets and anywhere else in wallet.
+ $('.scrollbar-dynamic').scrollbar(); // Make sure widget-body has scrollbar for transactions history
+ $('[data-toggle="tooltip"]').tooltip(); // Make sure tooltips are working for wallet widgets and anywhere else in wallet.
edexCoinBtnAction();
});
},
@@ -626,7 +629,7 @@ var Dashboard = function() {
console.log(textStatus);
console.log(error);
if (xhr.readyState == '0' ) {
- toastr.error('Unable to connect to Iguana', 'Account Notification');
+ toastr.error(_lang[defaultLang].TOASTR.IGUANA_CONN_ERR, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION);
}
}
});
@@ -694,17 +697,21 @@ var Dashboard = function() {
$('.btn_edexcoin_dashboard_fetchdata').click(function() {
var selected_coin = $(this).data('edexcoin');
- Shepherd_CheckBasiliskCacheData(selected_coin).then(function(result){
- console.log(result)
- console.log(result.coin)
- var call_data = {"allcoins": false,"coin":selected_coin,"calls":"listtransactions:getbalance"}
- console.log(call_data)
+ Shepherd_CheckBasiliskCacheData(selected_coin).then(function(result) {
+ console.log(result);
+ console.log(result.coin);
+ var call_data = {
+ 'allcoins': false,
+ 'coin': selected_coin,
+ 'calls': 'listtransactions:getbalance'
+ };
+ console.log(call_data);
- Shepherd_FetchBasiliskData(call_data).then(function(result){
- console.log(result)
- toastr.info('Fetching Data. Please wait for a minute to complete this task.', 'Basilisk Notification');
- })
- })
+ Shepherd_FetchBasiliskData(call_data).then(function(result) {
+ console.log(result);
+ toastr.info(_lang[defaultLang].TOASTR.FETCHING_DATA, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION);
+ });
+ });
});
$('.btn_edexcoin_dashboard_refresh_basilisk_conn').click(function() {
@@ -789,19 +796,23 @@ var Dashboard = function() {
var FetchBasiliskData = setInterval(function() {
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'),
- active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode');
+ active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode');
// TODO: refactor
if ( sessionStorage.getItem('IguanaActiveAccount') === null ) {
//clearInterval(FetchBasiliskData);
//console.log('=> No wallet logged in, or Dashboard not ative. No need to Run History.');
} else {
if ( active_edexcoinmodecode == 'Basilisk') {
- var call_data = {"allcoins": false,"coin":active_edexcoin,"calls":"listtransactions:getbalance"}
+ var call_data = {
+ 'allcoins': false,
+ 'coin': active_edexcoin,
+ 'calls': 'listtransactions:getbalance'
+ };
//console.log(call_data)
if ( sessionStorage.getItem('edexTmpRefresh') === null || sessionStorage.getItem('edexTmpRefresh') === 'start') {
- Shepherd_FetchBasiliskData(call_data).then(function(result){
- console.log(result)
- })
+ Shepherd_FetchBasiliskData(call_data).then(function(result) {
+ console.log(result);
+ });
}
}
}
@@ -1381,7 +1392,7 @@ function getDEXGetBalance2(coin) {
ajax_call_2.done(function(data) {
console.log(data);
if (data.error === 'less than required responses') {
- toastr.error('Less than required responses. Please try again.', 'Basilisk Notification');
+ toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].BASILISK_NOTIFICATION);
}
var tmpcalcnum = 0,
@@ -1673,7 +1684,7 @@ function refreshEDEXCoinWalletList() {
console.log(error);
if (xhr.readyState == '0' ) {
- toastr.error('Unable to connect to Iguana', 'Account Notification');
+ toastr.error(_lang[defaultLang].TOASTR.IGUANA_CONN_ERR, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION);
}
}
});
@@ -1723,7 +1734,7 @@ function SwitchBasicliskFull(switch_data) {
if (SwitchCoinDataOutput.result === 'coin added') {
console.log('coin added');
- toastr.success(switch_data.currency + ' switched to ' + mode_value + ' Mode', 'Coin Notification');
+ toastr.success(switch_data.currency + ' ' + _lang[defaultLang].TOASTR.SWITCHED_TO + ' ' + mode_value + ' ' + _lang[defaultLang].TOASTR.MODE, _lang[defaultLang].TOASTR.COIN_NOTIFICATION);
} else if (SwitchCoinDataOutput.result === 'coin already there') {
console.log('coin already there');
//toastr.info("Looks like" + switch_data.currency + "already running.", "Coin Notification");
@@ -1741,7 +1752,7 @@ function SwitchBasicliskFull(switch_data) {
console.log(textStatus);
console.log(error);
if (xhr.readyState == '0' ) {
- toastr.error('Unable to connect to Iguana', 'Account Notification');
+ toastr.error(_lang[defaultLang].TOASTR.IGUANA_CONN_ERR, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION);
}
}
});
@@ -2015,12 +2026,12 @@ function EdexGetTxList(coin) {
tmp_amount = result_data[index].amount;
if (!('amount' in result_data[index])) {
- tmp_amount = 'Unknown';
+ tmp_amount = '' + _lang[defaultLang].DASHBOARD.UNKNOWN + '';
}
var tmp_addr = result_data[index].address;
if (!('address' in result_data[index])) {
- tmp_addr = ' Z Address not listed by wallet!';
+ tmp_addr = ' ' + _lang[defaultLang].DASHBOARD.ZADDR_NOT_LISTED + '!';
}
var tmp_secondsToString = secondsToString(result_data[index].blocktime);
@@ -2071,12 +2082,12 @@ function EdexGetTxList(coin) {
tmp_amount = result_data[index].amount;
if (!('amount' in result_data[index])) {
- tmp_amount = 'Unknown';
+ tmp_amount = '' + _lang[defaultLang].DASHBOARD.UNKNOWN + '';
}
var tmp_addr = null
if (!('paid' in result_data[index])) {
- tmp_addr = ' Z Address not listed by wallet!';
+ tmp_addr = ' ' + _lang[defaultLang].DASHBOARD.ZADDR_NOT_LISTED + '!';
}
if (('paid' in result_data[index])) {
var first_addr = Object.keys(result_data[index].paid['vouts'][0]),
@@ -2086,23 +2097,23 @@ function EdexGetTxList(coin) {
var tmp_secondsToString = secondsToString(result_data[index].timestamp);
if ( result_data[index].type == 'sent' ) {
- tmp_category = ' OUT';
+ tmp_category = ' ' + _lang[defaultLang].DASHBOARD.OUT + '';
}
if ( result_data[index].type == 'received' ) {
- tmp_category = ' IN';
+ tmp_category = ' ' + _lang[defaultLang].DASHBOARD.IN + '';
}
if ( result_data[index].type == 'generate' ) {
- tmp_category = ' Mined';
+ tmp_category = ' ' + _lang[defaultLang].DASHBOARD.MINED;
}
if ( result_data[index].type == 'immature' ) {
- tmp_category = ' Immature';
+ tmp_category = ' ' + _lang[defaultLang].DASHBOARD.IMMATURE;
}
if ( result_data[index].type == 'unknown' ) {
- tmp_category = ' Unknown';
+ tmp_category = ' ' + _lang[defaultLang].DASHBOARD.UNKNOWN;
}
if (!('confirmations' in result_data[index])) {
- tmp_confirms = ' Unknown';
+ tmp_confirms = ' ' + _lang[defaultLang].DASHBOARD.UNKNOWN;
}
if (('confirmations' in result_data[index])) {
tmp_confirms = result_data[index].confirmations;
@@ -2114,7 +2125,7 @@ function EdexGetTxList(coin) {
tmp_amount,
tmp_secondsToString,
tmp_addr,
- '