aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2018-07-18 16:51:56 +0200
committerSander Ferdinand <sa.ferdinand@gmail.com>2018-07-18 16:51:56 +0200
commiteb457019dde0d15c5cb0fc940e1d05c76cbe8235 (patch)
tree2a5d553c55131b9a9fe352e4e42207f0fa639477 /js
parentb7dbb83294f058f6e02ec096d41c26f400f76668 (diff)
downloadmonzero-gui-eb457019dde0d15c5cb0fc940e1d05c76cbe8235.tar.gz
monzero-gui-eb457019dde0d15c5cb0fc940e1d05c76cbe8235.tar.xz
monzero-gui-eb457019dde0d15c5cb0fc940e1d05c76cbe8235.zip
Move function to show the seed page to Utils.js
Diffstat (limited to 'js')
-rw-r--r--js/Utils.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/js/Utils.js b/js/Utils.js
index fdf24c6b..56953f50 100644
--- a/js/Utils.js
+++ b/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();
} \ No newline at end of file