forked from Public/monero-gui
Move function to show the seed page to Utils.js
This commit is contained in:
27
js/Utils.js
27
js/Utils.js
@@ -26,4 +26,31 @@ function formatDate( date, params ) {
|
||||
|
||||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
|
||||
function showSeedPage() {
|
||||
// Shows `Settings->Seed & keys`. Prompts a password dialog.
|
||||
passwordDialog.onAcceptedCallback = function() {
|
||||
if(walletPassword === passwordDialog.password){
|
||||
if(currentWallet.seedLanguage == "") {
|
||||
console.log("No seed language set. Using English as default");
|
||||
currentWallet.setSeedLanguage("English");
|
||||
}
|
||||
// Load keys page
|
||||
middlePanel.state = "Keys"
|
||||
} else {
|
||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||
informationPopup.text = qsTr("Wrong password");
|
||||
informationPopup.open()
|
||||
informationPopup.onCloseCallback = function() {
|
||||
passwordDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
passwordDialog.onRejectedCallback = function() {
|
||||
appWindow.showPageRequest("Settings");
|
||||
}
|
||||
passwordDialog.open();
|
||||
if(isMobile) hideMenu();
|
||||
updateBalance();
|
||||
}
|
||||
Reference in New Issue
Block a user