|
|
@ -1,26 +1,23 @@ |
|
|
|
var Login = function() { |
|
|
|
|
|
|
|
|
|
|
|
toastr.options = { |
|
|
|
"closeButton": true, |
|
|
|
"debug": false, |
|
|
|
"positionClass": "toast-top-right", |
|
|
|
"showDuration": "5000", |
|
|
|
"hideDuration": "1000", |
|
|
|
"timeOut": "5000", |
|
|
|
"extendedTimeOut": "1000", |
|
|
|
"showEasing": "swing", |
|
|
|
"hideEasing": "linear", |
|
|
|
"showMethod": "fadeIn", |
|
|
|
"hideMethod": "fadeOut" |
|
|
|
'closeButton': true, |
|
|
|
'debug': false, |
|
|
|
'positionClass': 'toast-top-right', |
|
|
|
'showDuration': '5000', |
|
|
|
'hideDuration': '1000', |
|
|
|
'timeOut': '5000', |
|
|
|
'extendedTimeOut': '1000', |
|
|
|
'showEasing': 'swing', |
|
|
|
'hideEasing': 'linear', |
|
|
|
'showMethod': 'fadeIn', |
|
|
|
'hideMethod': 'fadeOut' |
|
|
|
} |
|
|
|
|
|
|
|
var handleLogin = function() { |
|
|
|
|
|
|
|
$('.login-form').validate({ |
|
|
|
//errorElement: 'span', //default input error message container
|
|
|
|
//errorClass: 'help-block', // default input error message class
|
|
|
|
//focusInvalid: false, // do not focus the last invalid input
|
|
|
|
// errorElement: 'span', //default input error message container
|
|
|
|
// errorClass: 'help-block', // default input error message class
|
|
|
|
// focusInvalid: false, // do not focus the last invalid input
|
|
|
|
rules: { |
|
|
|
password: { |
|
|
|
required: true |
|
|
@ -29,11 +26,11 @@ var Login = function() { |
|
|
|
|
|
|
|
messages: { |
|
|
|
password: { |
|
|
|
required: "Password is required." |
|
|
|
required: 'Password is required.' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
invalidHandler: function(event, validator) { //display error alert on form submit
|
|
|
|
invalidHandler: function(event, validator) { // display error alert on form submit
|
|
|
|
$('.alert-danger', $('.login-form')).show(); |
|
|
|
}, |
|
|
|
|
|
|
@ -52,87 +49,77 @@ var Login = function() { |
|
|
|
}, |
|
|
|
|
|
|
|
submitHandler: function(form) { |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@'+sessionStorage.getItem('IguanaRPCAuth'); |
|
|
|
var ajax_data = {'userpass':tmpIguanaRPCAuth,'handle': $('#wallet-handle').val(),'password': $('#password').val(),'timeout': '2592000',"agent":"bitcoinrpc","method":"walletpassphrase"} |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|
|
|
ajax_data = { |
|
|
|
'userpass': tmpIguanaRPCAuth, |
|
|
|
'handle': $('#wallet-handle').val(), |
|
|
|
'password': $('#password').val(), |
|
|
|
'timeout': '2592000', |
|
|
|
'agent': 'bitcoinrpc', |
|
|
|
'method': 'walletpassphrase' |
|
|
|
}; |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
data: ajax_data, |
|
|
|
data: JSON.stringify(ajax_data), |
|
|
|
url: 'http://127.0.0.1:7778', |
|
|
|
//url: 'http://127.0.0.1:7778/api/bitcoinrpc/walletpassphrase',
|
|
|
|
//dataType: 'JSON',
|
|
|
|
success: function(data, textStatus, jqXHR) { |
|
|
|
var LoginOutput = JSON.parse(data); |
|
|
|
var LoginDataToStore = JSON.stringify(data); |
|
|
|
LoginDataToStore = JSON.stringify(data), |
|
|
|
sessionStorage.setItem('IguanaActiveAccount', LoginDataToStore); |
|
|
|
//console.log(sessionStorage);
|
|
|
|
//console.log('== Data OutPut ==');
|
|
|
|
//console.log(LoginOutput);
|
|
|
|
|
|
|
|
if (LoginOutput.result === 'success') { |
|
|
|
console.log('Success'); |
|
|
|
//Iguana_DEXImportAll();
|
|
|
|
//swal("Success", "Login Successfully.", "success");
|
|
|
|
toastr.success("Login Successfull", "Account Notification") |
|
|
|
//var logincoinnames = []; $('#logincoinslist input[type=checkbox]:checked').each(function() { logincoinnames.push(this.value); }); console.log(logincoinnames);
|
|
|
|
/*$.each(logincoinnames, function( index, value ) { |
|
|
|
if ( value == 'BTC' ) { |
|
|
|
var logincoinmodeval = $("input[name='logincoinbtcmode']:checked").val(); |
|
|
|
var logincoin_data = {"coin": value, "mode": logincoinmodeval}; |
|
|
|
Iguana_addcoinLogin(logincoin_data); |
|
|
|
} |
|
|
|
if ( value == 'BTCD' ) { |
|
|
|
var logincoinmodeval = $("input[name='logincoinbtcdmode']:checked").val(); |
|
|
|
var logincoin_data = {"coin": value, "mode": logincoinmodeval}; |
|
|
|
Iguana_addcoinLogin(logincoin_data); |
|
|
|
} |
|
|
|
if ( value == 'KMD' ) { |
|
|
|
var logincoinmodeval = $("input[name='logincoinkmdmode']:checked").val(); |
|
|
|
var logincoin_data = {"coin": value, "mode": logincoinmodeval}; |
|
|
|
Iguana_addcoinLogin(logincoin_data); |
|
|
|
} |
|
|
|
});*/ |
|
|
|
toastr.success('Login Successfull', 'Account Notification') |
|
|
|
|
|
|
|
$('#password').val('') |
|
|
|
$('#wallet-login').hide(); |
|
|
|
$('#wallet-core').fadeIn(); |
|
|
|
$('body').removeClass( "page-login layout-full page-dark" ).addClass( "" ); |
|
|
|
$('link[id=loginStyle]')[0].disabled=true; |
|
|
|
//refreshEDEXCoinWalletList()
|
|
|
|
/*Shepherd_FetchBasiliskData().then(function(result){ |
|
|
|
console.log(result) |
|
|
|
location.reload(); |
|
|
|
})*/ |
|
|
|
$('body').removeClass( 'page-login layout-full page-dark' ).addClass( '' ); |
|
|
|
$('link[id=loginStyle]')[0].disabled = true; |
|
|
|
|
|
|
|
location.reload(); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// If something goes wrong, alert the error message that our service returned
|
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
if (LoginOutput.error === 'bitcoinrpc needs coin that is active') { |
|
|
|
toastr.info("Seems like there's no coin running. Activating BTC.", "Coin Notification"); |
|
|
|
var logincoinnames = []; $('#logincoinslist input[type=checkbox]:checked').each(function() { logincoinnames.push(this.value); }); console.log(logincoinnames); |
|
|
|
toastr.info('Seems like there\'s no coin running. Activating BTC.', 'Coin Notification'); |
|
|
|
var logincoinnames = []; |
|
|
|
$('#logincoinslist input[type=checkbox]:checked').each(function() { logincoinnames.push(this.value); }); |
|
|
|
console.log(logincoinnames); |
|
|
|
|
|
|
|
$.each(logincoinnames, function( index, value ) { |
|
|
|
if ( value == 'BTC' ) { |
|
|
|
var logincoinmodeval = $("input[name='logincoinbtcmode']:checked").val(); |
|
|
|
var logincoin_data = {"coin": value, "mode": logincoinmodeval}; |
|
|
|
var logincoinmodeval = $('input[name="logincoinbtcmode"]:checked').val(), |
|
|
|
logincoin_data = { |
|
|
|
'coin': value, |
|
|
|
'mode': logincoinmodeval |
|
|
|
}; |
|
|
|
Iguana_addcoinLogin(logincoin_data); |
|
|
|
} |
|
|
|
if ( value == 'BTCD' ) { |
|
|
|
var logincoinmodeval = $("input[name='logincoinbtcdmode']:checked").val(); |
|
|
|
var logincoin_data = {"coin": value, "mode": logincoinmodeval}; |
|
|
|
var logincoinmodeval = $('input[name="logincoinbtcdmode"]:checked').val(), |
|
|
|
logincoin_data = { |
|
|
|
'coin': value, |
|
|
|
'mode': logincoinmodeval |
|
|
|
}; |
|
|
|
Iguana_addcoinLogin(logincoin_data); |
|
|
|
} |
|
|
|
if ( value == 'KMD' ) { |
|
|
|
var logincoinmodeval = $("input[name='logincoinkmdmode']:checked").val(); |
|
|
|
var logincoin_data = {"coin": value, "mode": logincoinmodeval}; |
|
|
|
var logincoinmodeval = $('input[name="logincoinkmdmode"]:checked').val(), |
|
|
|
logincoin_data = { |
|
|
|
'coin': value, |
|
|
|
'mode': logincoinmodeval |
|
|
|
}; |
|
|
|
Iguana_addcoinLogin(logincoin_data); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else if ( LoginOutput.error === 'invalid passphrase' ) { |
|
|
|
toastr.info("Invalid Passphrase. Make sure your passphrase is correct, or create new wallet.", "Login Notification"); |
|
|
|
toastr.info('Invalid Passphrase. Make sure your passphrase is correct, or create new wallet.', 'Login Notification'); |
|
|
|
} else { |
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification"); |
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
} |
|
|
|
|
|
|
|
console.log(data.statusText); |
|
|
|
console.log(textStatus); |
|
|
|
console.log(jqXHR); |
|
|
@ -146,26 +133,24 @@ var Login = function() { |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
//toastr.warning("Opps... Something went wrong!", "Account Notification")
|
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
$('#section-dashboard').show(); |
|
|
|
$('#section-easydex').hide(); |
|
|
|
$('#section-about-iguana').hide(); |
|
|
|
$('#nav-dashboard').removeClass( "" ).addClass( "active open" ); |
|
|
|
$('#nav-easydex').removeClass( " active open" ).addClass( "" ); |
|
|
|
$('#nav-about-iguana').removeClass( " active open" ).addClass( "" ); |
|
|
|
//form.submit(); // form validation success, call ajax form submit
|
|
|
|
$('#nav-dashboard').removeClass( '' ).addClass( 'active open' ); |
|
|
|
$('#nav-easydex').removeClass( 'active open' ).addClass( '' ); |
|
|
|
$('#nav-about-iguana').removeClass( 'active open' ).addClass( '' ); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
$('.login-form input').keypress(function(e) { |
|
|
|
if (e.which == 13) { |
|
|
|
if ($('.login-form').validate().form()) { |
|
|
|
$('.login-form').submit(); //form validation success, call ajax form submit
|
|
|
|
$('.login-form').submit(); // form validation success, call ajax form submit
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
@ -187,41 +172,27 @@ var Login = function() { |
|
|
|
} |
|
|
|
|
|
|
|
var handleRegister = function() { |
|
|
|
|
|
|
|
$('.register-form').validate({ |
|
|
|
errorElement: 'span', //default input error message container
|
|
|
|
errorElement: 'span', // default input error message container
|
|
|
|
errorClass: 'help-block', // default input error message class
|
|
|
|
focusInvalid: false, // do not focus the last invalid input
|
|
|
|
ignore: "", |
|
|
|
ignore: '', |
|
|
|
rules: { |
|
|
|
|
|
|
|
walletseed: { |
|
|
|
required: true |
|
|
|
}, |
|
|
|
|
|
|
|
rwalletseed: { |
|
|
|
equalTo: "#walletseed" |
|
|
|
}, |
|
|
|
|
|
|
|
/*password: { |
|
|
|
required: true |
|
|
|
}, |
|
|
|
rpassword: { |
|
|
|
equalTo: "#register_password" |
|
|
|
},*/ |
|
|
|
|
|
|
|
|
|
|
|
equalTo: '#walletseed' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
messages: { |
|
|
|
rwalletseed: { |
|
|
|
required: "Wallet seed is required." |
|
|
|
required: 'Wallet seed is required.' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
invalidHandler: function(event, validator) { //display error alert on form submit
|
|
|
|
invalidHandler: function(event, validator) { // display error alert on form submit
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
@ -236,7 +207,7 @@ var Login = function() { |
|
|
|
}, |
|
|
|
|
|
|
|
errorPlacement: function(error, element) { |
|
|
|
if (element.attr("name") == "backupconfirm") { // insert checkbox errors after the container
|
|
|
|
if (element.attr('name') == 'backupconfirm') { // insert checkbox errors after the container
|
|
|
|
error.insertAfter($('#register_backupconfirm_error')); |
|
|
|
} else if (element.closest('.input-icon').size() === 1) { |
|
|
|
error.insertAfter(element.closest('.input-icon')); |
|
|
@ -248,78 +219,90 @@ var Login = function() { |
|
|
|
submitHandler: function(form) { |
|
|
|
swal({ |
|
|
|
title: 'Have you saved your wallet seed?', |
|
|
|
text: "Make sure you have it backed up. Without this seed you won't be able to access your wallet in the future!", |
|
|
|
text: 'Make sure you have it backed up. Without this seed you won\'t be able to access your wallet in the future!', |
|
|
|
type: 'warning', |
|
|
|
showCancelButton: true, |
|
|
|
confirmButtonColor: '#3085d6', |
|
|
|
cancelButtonColor: '#d33', |
|
|
|
confirmButtonText: 'Yes, I have taken backup.' |
|
|
|
}).then(function() { |
|
|
|
//swal('Deleted!', 'Your file has been deleted.', 'success' );
|
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@'+sessionStorage.getItem('IguanaRPCAuth'); |
|
|
|
var ajax_data = {'userpass':tmpIguanaRPCAuth,"agent":"bitcoinrpc","method":"encryptwallet",'passphrase': $('#walletseed').val()} |
|
|
|
}) |
|
|
|
.then(function() { |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|
|
|
ajax_data = { |
|
|
|
'userpass': tmpIguanaRPCAuth, |
|
|
|
'agent': 'bitcoinrpc', |
|
|
|
'method': 'encryptwallet', |
|
|
|
'passphrase': $('#walletseed').val() |
|
|
|
}; |
|
|
|
// Use AJAX to post the object to login user
|
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
data: ajax_data, |
|
|
|
data: JSON.stringify(ajax_data), |
|
|
|
url: 'http://127.0.0.1:7778', |
|
|
|
//dataType: 'text',
|
|
|
|
success: function(data, textStatus, jqXHR) { |
|
|
|
var CreateWalletOutput = JSON.parse(data); |
|
|
|
//console.log(sessionStorage);
|
|
|
|
//console.log('== Data OutPut ==');
|
|
|
|
//console.log(CreateWalletOutput);
|
|
|
|
|
|
|
|
if (CreateWalletOutput.result === 'success') { |
|
|
|
console.log('Success'); |
|
|
|
//swal("Success", "Login Successfully.", "success");
|
|
|
|
toastr.success("Wallet created successfully", "Account Notification") |
|
|
|
//Iguana_DEXImportAll();
|
|
|
|
toastr.success('Wallet created successfully', 'Account Notification'); |
|
|
|
// Iguana_DEXImportAll();
|
|
|
|
|
|
|
|
$('#wallet-handle').val('') |
|
|
|
$('#password').val('') |
|
|
|
} |
|
|
|
else { |
|
|
|
$('#wallet-handle').val(''); |
|
|
|
$('#password').val(''); |
|
|
|
} else { |
|
|
|
// If something goes wrong, alert the error message that our service returned
|
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification") |
|
|
|
console.log(CreateWalletOutput) |
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
console.log(CreateWalletOutput); |
|
|
|
|
|
|
|
if (CreateWalletOutput.error === 'bitcoinrpc needs coin that is active') { |
|
|
|
toastr.info("Seems like there's no coin running. Activating BTC.", "Coin Notification"); |
|
|
|
var logincoinnames = []; $('#logincoinslist input[type=checkbox]:checked').each(function() { logincoinnames.push(this.value); }); console.log(logincoinnames); |
|
|
|
toastr.info('Seems like there\'s no coin running. Activating BTC.', 'Coin Notification'); |
|
|
|
var logincoinnames = []; |
|
|
|
$('#logincoinslist input[type=checkbox]:checked').each(function() { logincoinnames.push(this.value); }); |
|
|
|
console.log(logincoinnames); |
|
|
|
|
|
|
|
$.each(logincoinnames, function( index, value ) { |
|
|
|
if ( value == 'BTC' ) { |
|
|
|
var logincoinmodeval = $("input[name='logincoinbtcmode']:checked").val(); |
|
|
|
var logincoin_data = {"coin": value, "mode": logincoinmodeval, "reload": false}; |
|
|
|
var logincoinmodeval = $('input[name="logincoinbtcmode"]:checked').val(), |
|
|
|
logincoin_data = { |
|
|
|
'coin': value, |
|
|
|
'mode': logincoinmodeval, |
|
|
|
'reload': false |
|
|
|
}; |
|
|
|
Iguana_addcoin(logincoin_data); |
|
|
|
if (index == '0' ) { |
|
|
|
console.log(value+' '+index); |
|
|
|
console.log(value + ' ' + index); |
|
|
|
$('.register-form').submit(); |
|
|
|
toastr.success("Wallet created successfully", "Account Notification") |
|
|
|
toastr.success('Wallet created successfully', 'Account Notification'); |
|
|
|
} |
|
|
|
} |
|
|
|
if ( value == 'BTCD' ) { |
|
|
|
var logincoinmodeval = $("input[name='logincoinbtcdmode']:checked").val(); |
|
|
|
var logincoin_data = {"coin": value, "mode": logincoinmodeval, "reload": false}; |
|
|
|
var logincoinmodeval = $('input[name="logincoinbtcdmode"]:checked').val(), |
|
|
|
logincoin_data = { |
|
|
|
'coin': value, |
|
|
|
'mode': logincoinmodeval, |
|
|
|
'reload': false |
|
|
|
}; |
|
|
|
Iguana_addcoin(logincoin_data); |
|
|
|
if (index == '0' ) { |
|
|
|
console.log(value+' '+index); |
|
|
|
console.log(value + ' ' + index); |
|
|
|
$('.register-form').submit(); |
|
|
|
toastr.success("Wallet created successfully", "Account Notification") |
|
|
|
toastr.success('Wallet created successfully', 'Account Notification'); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification"); |
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
} |
|
|
|
|
|
|
|
console.log(data.statusText); |
|
|
|
|
|
|
|
if ( data.readyState == 0 ) { |
|
|
|
Iguana_ServiceUnavailable(); |
|
|
|
} |
|
|
|
|
|
|
|
console.log(textStatus); |
|
|
|
console.log(jqXHR); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
error: function(xhr, textStatus, error) { |
|
|
@ -330,30 +313,26 @@ var Login = function() { |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification") |
|
|
|
|
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
$('#section-login').fadeIn(); |
|
|
|
$('#section-register').hide(); |
|
|
|
$('#walletseed').text(PassPhraseGenerator.generatePassPhrase(256)); |
|
|
|
$('#rwalletseed').val('') |
|
|
|
$('#register_password').val('') |
|
|
|
$('#rpassword').val('') |
|
|
|
}) |
|
|
|
|
|
|
|
//form.submit();
|
|
|
|
$('#rwalletseed').val(''); |
|
|
|
$('#register_password').val(''); |
|
|
|
$('#rpassword').val(''); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$('.register-form input').keypress(function(e) { |
|
|
|
if (e.which == 13) { |
|
|
|
if ($('.register-form').validate().form()) { |
|
|
|
$('.register-form').submit(); |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
@ -370,40 +349,40 @@ var Login = function() { |
|
|
|
$('#section-login').fadeIn(); |
|
|
|
$('#section-register').hide(); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var handleLogout = function() { |
|
|
|
|
|
|
|
$('#logout-account').click(function() { |
|
|
|
$('#section-login-addcoin-btn').hide(); |
|
|
|
$('#section-login').show(); |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@'+sessionStorage.getItem('IguanaRPCAuth'); |
|
|
|
var ajax_data = {'userpass':tmpIguanaRPCAuth,"agent":"bitcoinrpc","method":"walletlock"} |
|
|
|
|
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|
|
|
ajax_data = { |
|
|
|
'userpass': tmpIguanaRPCAuth, |
|
|
|
'agent': 'bitcoinrpc', |
|
|
|
'method': 'walletlock' |
|
|
|
}; |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
data: JSON.stringify(ajax_data), |
|
|
|
//url: 'http://127.0.0.1:7778/api/bitcoinrpc/walletlock',
|
|
|
|
url: 'http://127.0.0.1:7778', |
|
|
|
//dataType: 'text',
|
|
|
|
success: function(data, textStatus, jqXHR) { |
|
|
|
var LogoutOutput = JSON.parse(data); |
|
|
|
//sessionStorage.clear();
|
|
|
|
// sessionStorage.clear();
|
|
|
|
sessionStorage.removeItem('IguanaActiveAccount'); |
|
|
|
console.log('== Logout Data OutPut =='); |
|
|
|
console.log(LogoutOutput); |
|
|
|
|
|
|
|
if (LogoutOutput.result === 'success') { |
|
|
|
console.log('Success'); |
|
|
|
//swal("Success", "Logout Successfully.", "success");
|
|
|
|
toastr.success("Logout Successfull", "Account Notification") |
|
|
|
toastr.success('Logout Successfull', 'Account Notification'); |
|
|
|
$('#wallet-login').show(); |
|
|
|
$('body').removeClass( "" ).addClass( "page-login layout-full page-dark" ); |
|
|
|
$('body').removeClass( '' ).addClass( 'page-login layout-full page-dark' ); |
|
|
|
$('#wallet-core').hide(); |
|
|
|
$('link[id=loginStyle]')[0].disabled=false; |
|
|
|
$('link[id=loginStyle]')[0].disabled = false; |
|
|
|
|
|
|
|
//Make sure these fields are unhidden.
|
|
|
|
// Make sure these fields are unhidden.
|
|
|
|
$('#login-welcome').text('Welcome.'); |
|
|
|
$('#wallet-handle').show(); |
|
|
|
$('.create-account').show(); |
|
|
@ -414,19 +393,15 @@ var Login = function() { |
|
|
|
//Stop SetInterval Calls
|
|
|
|
StopShowCoinHistory(); |
|
|
|
StopTotalFiatValue(); |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// If something goes wrong, alert the error message that our service returned
|
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification") |
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
console.log(data.statusText); |
|
|
|
if ( xhr.readyState == 0 ) { |
|
|
|
Iguana_ServiceUnavailable(); |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(jqXHR); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
error: function(xhr, textStatus, error) { |
|
|
@ -437,73 +412,75 @@ var Login = function() { |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification") |
|
|
|
|
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
var handleLock = function() { |
|
|
|
//Begin Lock Active Wallet
|
|
|
|
// Begin Lock Active Wallet
|
|
|
|
$('#lock-screen').click(function() { |
|
|
|
$('#section-login-addcoin-btn').hide(); |
|
|
|
$('#section-login').show(); |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@'+sessionStorage.getItem('IguanaRPCAuth'); |
|
|
|
var ajax_data = {'userpass':tmpIguanaRPCAuth,"agent":"bitcoinrpc","method":"walletlock"} |
|
|
|
|
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|
|
|
ajax_data = { |
|
|
|
'userpass': tmpIguanaRPCAuth, |
|
|
|
'agent': 'bitcoinrpc', |
|
|
|
'method': 'walletlock' |
|
|
|
}; |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
data: JSON.stringify(ajax_data), |
|
|
|
//url: 'http://127.0.0.1:7778/api/bitcoinrpc/walletlock',
|
|
|
|
url: 'http://127.0.0.1:7778', |
|
|
|
success: function(data, textStatus, jqXHR) { |
|
|
|
var LockOutput = JSON.parse(data); |
|
|
|
// Begin Check Active Wallet's status
|
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|
|
|
ajax_data_activehandle = { |
|
|
|
'userpass': tmpIguanaRPCAuth, |
|
|
|
'agent': 'SuperNET', |
|
|
|
'method': 'activehandle' |
|
|
|
}; |
|
|
|
|
|
|
|
//Begin Check Active Wallet's status
|
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@'+sessionStorage.getItem('IguanaRPCAuth'); |
|
|
|
var ajax_data_activehandle = {'userpass':tmpIguanaRPCAuth,"agent":"SuperNET","method":"activehandle"} |
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
data: JSON.stringify(ajax_data_activehandle), |
|
|
|
url: 'http://127.0.0.1:7778', |
|
|
|
//url: 'http://127.0.0.1:7778/api/SuperNET/activehandle',
|
|
|
|
//dataType: 'text',
|
|
|
|
success: function(data, textStatus, jqXHR) { |
|
|
|
var ActiveHandleOutput = JSON.parse(data); |
|
|
|
var ActiveHandleDataToStore = JSON.stringify(data); |
|
|
|
var ActiveHandleOutput = JSON.parse(data), |
|
|
|
ActiveHandleDataToStore = JSON.stringify(data); |
|
|
|
|
|
|
|
sessionStorage.setItem('IguanaActiveAccount', ActiveHandleDataToStore); |
|
|
|
console.log('== Data OutPut - Active Handle =='); |
|
|
|
console.log(ActiveHandleOutput); |
|
|
|
|
|
|
|
if (ActiveHandleOutput.status === 'locked') { |
|
|
|
console.log('Success'); |
|
|
|
//swal("Success", "Wallet Locked Successfully.", "success");
|
|
|
|
toastr.success("Wallet Locked Successfully", "Account Notification") |
|
|
|
toastr.success('Wallet Locked Successfully', 'Account Notification'); |
|
|
|
|
|
|
|
$('#wallet-login').show(); |
|
|
|
$('body').removeClass( "" ).addClass( "page-login layout-full page-dark" ); |
|
|
|
$('body').removeClass( '' ).addClass( 'page-login layout-full page-dark' ); |
|
|
|
$('#wallet-core').hide(); |
|
|
|
$('link[id=loginStyle]')[0].disabled=false; |
|
|
|
$('link[id=loginStyle]')[0].disabled = false; |
|
|
|
$("#loginbtn").text('Unlock'); |
|
|
|
//Hide some login fields not needing at lock screen
|
|
|
|
// Hide some login fields not needing at lock screen
|
|
|
|
console.log('Wallet is Locked.'); |
|
|
|
$('#login-welcome').text('Wallet Locked. Please login.'); |
|
|
|
$('#register-btn').hide(); |
|
|
|
$('#logint-another-wallet').show(); |
|
|
|
$('#logincoinslist').hide(); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// If something goes wrong, alert the error message that our service returned
|
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification") |
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
console.log(data.statusText); |
|
|
|
if ( xhr.readyState == 0 ) { |
|
|
|
Iguana_ServiceUnavailable(); |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(jqXHR); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
error: function(xhr, textStatus, error) { |
|
|
@ -514,15 +491,12 @@ var Login = function() { |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification") |
|
|
|
|
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
} |
|
|
|
}); |
|
|
|
//End Check Active Wallet's status
|
|
|
|
|
|
|
|
//console.log('== Data OutPut - Wallet Lock ==');
|
|
|
|
//console.log(LockOutput);
|
|
|
|
// End Check Active Wallet's status
|
|
|
|
// console.log('== Data OutPut - Wallet Lock ==');
|
|
|
|
// console.log(LockOutput);
|
|
|
|
}, |
|
|
|
error: function(xhr, textStatus, error) { |
|
|
|
console.log('failure'); |
|
|
@ -532,45 +506,37 @@ var Login = function() { |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification") |
|
|
|
|
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
//End Lock Active Wallet
|
|
|
|
// End Lock Active Wallet
|
|
|
|
}; |
|
|
|
|
|
|
|
var handleCheckLogin = function() { |
|
|
|
//Iguana_activehandle();
|
|
|
|
//console.log('Iguana_activehandle_output: '+Iguana_activehandle_output);
|
|
|
|
if ( sessionStorage.getItem('IguanaActiveAccount') === null ) { |
|
|
|
console.log('There\'s no active wallet logged in. Please Login.'); |
|
|
|
$('#logint-another-wallet').hide(); |
|
|
|
Iguana_CheckActiveCoins().then(function(result){ |
|
|
|
//console.log(result)
|
|
|
|
Iguana_CheckActiveCoins().then(function(result) { |
|
|
|
if (result.length !== 0 ) { |
|
|
|
$('#section-login-addcoin-btn').hide(); |
|
|
|
$('#section-login').show(); |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
} else { |
|
|
|
var CheckLoginData = JSON.parse(sessionStorage.getItem('IguanaActiveAccount')); |
|
|
|
|
|
|
|
Iguana_activehandle().then(function(result){ |
|
|
|
//console.log(result)
|
|
|
|
Iguana_activehandle().then(function(result) { |
|
|
|
if ( JSON.parse(CheckLoginData).pubkey != result.pubkey ) { |
|
|
|
//console.log("Login: sessionStorage data and activehandle data doesn't match");
|
|
|
|
//console.log('result: '+result.rmd160);
|
|
|
|
//console.log('CheckLoginData: ' + JSON.parse(CheckLoginData).rmd160);
|
|
|
|
ClearOnLogout(false, false); |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
if ( JSON.parse(CheckLoginData).status === 'unlocked' ) { |
|
|
|
console.log(JSON.parse(CheckLoginData).status); |
|
|
|
$('#password').val('') |
|
|
|
$('#wallet-login').hide(); |
|
|
|
$('body').removeClass( "page-login layout-full page-dark" ).addClass( "" ); |
|
|
|
$('body').removeClass( 'page-login layout-full page-dark' ).addClass( '' ); |
|
|
|
$('#wallet-core').fadeIn(); |
|
|
|
} else if ( JSON.parse(CheckLoginData).status === 'locked' ) { |
|
|
|
console.log('Wallet is Locked.'); |
|
|
@ -583,22 +549,20 @@ var Login = function() { |
|
|
|
} |
|
|
|
if ( sessionStorage.getItem('IguanaRPCAuth') === null || typeof sessionStorage.getItem('IguanaRPCAuth') == undefined) { |
|
|
|
Iguana_SetRPCAuth(); |
|
|
|
typeof sessionStorage.getItem('IguanaRPCAuth') |
|
|
|
typeof sessionStorage.getItem('IguanaRPCAuth'); |
|
|
|
console.log(sessionStorage.getItem('IguanaRPCAuth')); |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@'+sessionStorage.getItem('IguanaRPCAuth'); |
|
|
|
console.log(tmpIguanaRPCAuth) |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|
|
|
console.log(tmpIguanaRPCAuth); |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
var handleCoinsRunningCheck = function() { |
|
|
|
Iguana_CheckActiveCoins().then(function(result){ |
|
|
|
//console.log(result)
|
|
|
|
Iguana_CheckActiveCoins().then(function(result) { |
|
|
|
if (result.length !== 0 ) { |
|
|
|
$('#section-login-addcoin-btn').hide(); |
|
|
|
$('#section-login').show(); |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
/*$.each([ 'basilisk', 'full', 'virtual' ], function( index, value ) { |
|
|
|
var allcoinsvalues = {"agent":"InstantDEX","method":"allcoins"}; |
|
|
@ -628,8 +592,6 @@ var Login = function() { |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if ( sessionStorage.getItem('IguanaActiveAccount') === null ) { |
|
|
|
$.each([ 'BTC', 'BTCD' ], function( index, value ) { |
|
|
|
var AddCoinBasiliskData = { |
|
|
@ -679,15 +641,18 @@ var Login = function() { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var handleLoginAnotherWallet = function() { |
|
|
|
$('#logint-another-wallet').click(function() { |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|
|
|
ajax_data = { |
|
|
|
'userpass': tmpIguanaRPCAuth, |
|
|
|
'agent': 'bitcoinrpc', |
|
|
|
'method': 'walletlock' |
|
|
|
}; |
|
|
|
|
|
|
|
$('#logint-another-wallet').show(); |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@'+sessionStorage.getItem('IguanaRPCAuth'); |
|
|
|
var ajax_data = {'userpass':tmpIguanaRPCAuth,"agent":"bitcoinrpc","method":"walletlock"} |
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
data: JSON.stringify(ajax_data), |
|
|
@ -696,32 +661,26 @@ var Login = function() { |
|
|
|
var LogoutOutput = JSON.parse(data); |
|
|
|
//sessionStorage.clear();
|
|
|
|
sessionStorage.removeItem('IguanaActiveAccount'); |
|
|
|
//console.log('== Data OutPut ==');
|
|
|
|
//console.log(LogoutOutput);
|
|
|
|
|
|
|
|
if (LogoutOutput.result === 'success') { |
|
|
|
console.log('Success'); |
|
|
|
//swal("Success", "Logout Successfully.", "success");
|
|
|
|
toastr.success("Logout Successfull", "Account Notification") |
|
|
|
toastr.success('Logout Successfull', 'Account Notification'); |
|
|
|
|
|
|
|
$('#wallet-login').show(); |
|
|
|
$('body').removeClass( "" ).addClass( "page-login layout-full page-dark" ); |
|
|
|
$('body').removeClass( '' ).addClass( 'page-login layout-full page-dark' ); |
|
|
|
$('#wallet-core').hide(); |
|
|
|
$('link[id=loginStyle]')[0].disabled=false; |
|
|
|
$('link[id=loginStyle]')[0].disabled = false; |
|
|
|
|
|
|
|
//Make sure these fields are unhidden.
|
|
|
|
// Make sure these fields are unhidden.
|
|
|
|
$('#login-welcome').text('Welcome. Please login.'); |
|
|
|
$('.create-account').show(); |
|
|
|
$('#register-btn').show(); |
|
|
|
$('#logint-another-wallet').hide(); |
|
|
|
$("#loginbtn").text('Sign in'); |
|
|
|
$('#logincoinslist').show(); |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// If something goes wrong, alert the error message that our service returned
|
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification") |
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
console.log(data.statusText); |
|
|
|
if ( xhr.readyState == 0 ) { |
|
|
|
Iguana_ServiceUnavailable(); |
|
|
@ -738,8 +697,7 @@ var Login = function() { |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
//swal("Oops...", "Something went wrong!", "error");
|
|
|
|
toastr.warning("Opps... Something went wrong!", "Account Notification") |
|
|
|
toastr.warning('Opps... Something went wrong!', 'Account Notification'); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -749,75 +707,74 @@ var Login = function() { |
|
|
|
$('#addcoin_mdl_native_mode_login').prop('disabled', true); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop('disabled', true); |
|
|
|
$('#addcoin_mdl_full_mode_login').prop('disabled', true); |
|
|
|
$('#addcoin_mdl_full_mode_login').prop("checked", false); |
|
|
|
$('#addcoin_mdl_full_mode_login').prop('checked', false); |
|
|
|
|
|
|
|
$('.mdl_addcoin_done_btn-login').click(function(){ |
|
|
|
$('.mdl_addcoin_done_btn-login').click(function() { |
|
|
|
ExecuteAddCoinLoginFn(); |
|
|
|
}); |
|
|
|
|
|
|
|
$( "#addcoin_select_coin_mdl_options-login" ).change(function() { |
|
|
|
var tmp_coin_val = $('#addcoin_select_coin_mdl_options-login').val() |
|
|
|
var tmp_coin_val = $('#addcoin_select_coin_mdl_options-login').val(); |
|
|
|
|
|
|
|
if (tmp_coin_val !== 'KMD' || tmp_coin_val !== 'KMD' ) { |
|
|
|
$('#addcoin_mdl_native_mode_login').prop('disabled', true); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop('disabled', true); |
|
|
|
$('#addcoin_mdl_full_mode_login').prop('disabled', false); |
|
|
|
$('#addcoin_mdl_full_mode_login').prop("checked", true); |
|
|
|
$('#addcoin_mdl_full_mode_login').prop('checked', true); |
|
|
|
} |
|
|
|
if (tmp_coin_val == 'KMD') { |
|
|
|
$('#addcoin_mdl_native_mode_login').prop('disabled', false); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop('disabled', false); |
|
|
|
$('#addcoin_mdl_full_mode_login').prop('disabled', false); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop("checked", true); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop('checked', true); |
|
|
|
} |
|
|
|
if (tmp_coin_val == 'SUPERNET' |
|
|
|
|| tmp_coin_val == 'REVS' |
|
|
|
|| tmp_coin_val == 'USD') { |
|
|
|
if (tmp_coin_val == 'SUPERNET' || |
|
|
|
tmp_coin_val == 'REVS' || |
|
|
|
tmp_coin_val == 'USD') { |
|
|
|
$('#addcoin_mdl_native_mode_login').prop('disabled', true); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop('disabled', false); |
|
|
|
$('#addcoin_mdl_full_mode_login').prop('disabled', true); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop("checked", true); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop('checked', true); |
|
|
|
} |
|
|
|
if (tmp_coin_val == 'BTC') { |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop('disabled', false); |
|
|
|
$('#addcoin_mdl_native_mode_login').prop('disabled', true); |
|
|
|
$('#addcoin_mdl_full_mode_login').prop('disabled', false); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop("checked", true); |
|
|
|
$('#addcoin_mdl_basilisk_mode_login').prop('checked', true); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
var handleAddCoinOSOptions = function() { |
|
|
|
if ( navigator.platform == 'Win32' //|| navigator.platform == 'MacIntel'
|
|
|
|
//|| navigator.platform == 'Linux x86_64' || navigator.platform == 'Linux' || navigator.platform == 'Linux i686'
|
|
|
|
if ( navigator.platform == 'Win32' // || navigator.platform == 'MacIntel'
|
|
|
|
// || navigator.platform == 'Linux x86_64' || navigator.platform == 'Linux' || navigator.platform == 'Linux i686'
|
|
|
|
) { |
|
|
|
//Conditions for Login Add Coin Dialog
|
|
|
|
// Conditions for Login Add Coin Dialog
|
|
|
|
$.each($('.style-addcoin-lbl-mdl-login'), function(index, value) { |
|
|
|
if ( index == 0 || index == 1 ) { |
|
|
|
$(value).removeClass('col-lg-4 col-md-4').addClass('col-lg-6 col-md-6') |
|
|
|
$(value).removeClass('col-lg-4 col-md-4').addClass('col-lg-6 col-md-6'); |
|
|
|
} |
|
|
|
if ( index == 2 ) { |
|
|
|
$(value).hide() |
|
|
|
$(value).hide(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//Conditions for Dashboard Add Coin Dialog
|
|
|
|
// Conditions for Dashboard Add Coin Dialog
|
|
|
|
$.each($('.style-addcoin-lbl-mdl'), function(index, value) { |
|
|
|
if ( index == 0 || index == 1 ) { |
|
|
|
$(value).removeClass('col-lg-4 col-md-4').addClass('col-lg-6 col-md-6') |
|
|
|
$(value).removeClass('col-lg-4 col-md-4').addClass('col-lg-6 col-md-6'); |
|
|
|
} |
|
|
|
if ( index == 2 ) { |
|
|
|
$(value).hide() |
|
|
|
$(value).hide(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
//main function to initiate the module
|
|
|
|
// main function to initiate the module
|
|
|
|
init: function() { |
|
|
|
|
|
|
|
//handleCoinsRunningCheck();
|
|
|
|
// handleCoinsRunningCheck();
|
|
|
|
handleLogin(); |
|
|
|
handleLock(); |
|
|
|
handleRegister(); |
|
|
@ -825,29 +782,24 @@ var Login = function() { |
|
|
|
handleCheckLogin(); |
|
|
|
handleLoginAnotherWallet(); |
|
|
|
handleAddCoinLoginBtn(); |
|
|
|
//handleAddCoinOSOptions();
|
|
|
|
|
|
|
|
// handleAddCoinOSOptions();
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}(); |
|
|
|
|
|
|
|
jQuery(document).ready(function() { |
|
|
|
Login.init(); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
function ClearOnLogout(cleardata, stopinterval) { |
|
|
|
if ( cleardata === true ) { |
|
|
|
//sessionStorage.clear();
|
|
|
|
sessionStorage.removeItem('IguanaActiveAccount'); |
|
|
|
} |
|
|
|
if ( cleardata === false || cleardata === null ) { |
|
|
|
console.log('sessionStorage data not cleared.'); |
|
|
|
} |
|
|
|
if ( stopinterval === true ) { |
|
|
|
//Stop SetInterval Calls
|
|
|
|
// Stop SetInterval Calls
|
|
|
|
StopShowCoinHistory(); |
|
|
|
StopTotalFiatValue(); |
|
|
|
} |
|
|
@ -855,12 +807,12 @@ function ClearOnLogout(cleardata, stopinterval) { |
|
|
|
console.log('SetInterval data not cleared.'); |
|
|
|
} |
|
|
|
$('#wallet-login').show(); |
|
|
|
$('body').removeClass( "" ).addClass( "page-login layout-full page-dark" ); |
|
|
|
$('body').removeClass( '' ).addClass( 'page-login layout-full page-dark' ); |
|
|
|
$('#wallet-core').hide(); |
|
|
|
$('link[id=loginStyle]')[0].disabled=false; |
|
|
|
$('link[id=loginStyle]')[0].disabled = false; |
|
|
|
$('#logint-another-wallet').hide(); |
|
|
|
|
|
|
|
//Make sure these fields are unhidden.
|
|
|
|
// Make sure these fields are unhidden.
|
|
|
|
$('#login-welcome').text('Welcome.'); |
|
|
|
$('#wallet-handle').show(); |
|
|
|
$('.create-account').show(); |
|
|
|