aboutsummaryrefslogtreecommitdiff
path: root/wizard
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-08-06 17:11:12 +0200
committerJaquee <jaquee.monero@gmail.com>2017-11-01 17:02:44 +0100
commitbbcb780cfa821b2176c86e3ffd5118778b5588da (patch)
tree20718ac9a7826055678daf79aeb6786b5cdeb467 /wizard
parent91953f1a3a1680ad68da7247af892fbd828fc556 (diff)
downloadmonzero-gui-bbcb780cfa821b2176c86e3ffd5118778b5588da.tar.gz
monzero-gui-bbcb780cfa821b2176c86e3ffd5118778b5588da.tar.xz
monzero-gui-bbcb780cfa821b2176c86e3ffd5118778b5588da.zip
wizard: use m_wallet instead of storing in settingsObj
Diffstat (limited to 'wizard')
-rw-r--r--wizard/WizardCreateWallet.qml6
-rw-r--r--wizard/WizardFinish.qml2
-rw-r--r--wizard/WizardMain.qml14
-rw-r--r--wizard/WizardManageWalletUI.qml4
-rw-r--r--wizard/WizardPassword.qml5
-rw-r--r--wizard/WizardRecoveryWallet.qml2
6 files changed, 16 insertions, 17 deletions
diff --git a/wizard/WizardCreateWallet.qml b/wizard/WizardCreateWallet.qml
index 99ee2478..14142212 100644
--- a/wizard/WizardCreateWallet.qml
+++ b/wizard/WizardCreateWallet.qml
@@ -78,7 +78,7 @@ ColumnLayout {
// page submitted or b) delete it when program closed before reaching final page
// Always delete the wallet object before creating new - we could be stepping back from recovering wallet
- if (typeof settingsObject.wallet !== 'undefined') {
+ if (typeof m_wallet !== 'undefined') {
walletManager.closeWallet()
console.log("deleting wallet")
}
@@ -91,8 +91,8 @@ ColumnLayout {
uiItem.wordsTextItem.memoText = wallet.seed
// saving wallet in "global" settings object
// TODO: wallet should have a property pointing to the file where it stored or loaded from
- settingsObject.wallet = wallet
- settingsObject.tmp_wallet_filename = tmp_wallet_filename
+ m_wallet = wallet;
+ settingsObject['tmp_wallet_filename'] = tmp_wallet_filename
}
WizardManageWalletUI {
diff --git a/wizard/WizardFinish.qml b/wizard/WizardFinish.qml
index 30292f08..794a5cf9 100644
--- a/wizard/WizardFinish.qml
+++ b/wizard/WizardFinish.qml
@@ -100,7 +100,7 @@ ColumnLayout {
ListElement { dotColor: "#36B05B" }
ListElement { dotColor: "#36B05B" }
ListElement { dotColor: "#36B05B" }
- //ListElement { dotColor: "#36B05B" }
+ ListElement { dotColor: "#FFE00A" }
}
Repeater {
diff --git a/wizard/WizardMain.qml b/wizard/WizardMain.qml
index 0eeb4384..ade1de60 100644
--- a/wizard/WizardMain.qml
+++ b/wizard/WizardMain.qml
@@ -44,6 +44,8 @@ ColumnLayout {
property int wizardRightMargin: (!isMobile) ? 150 : 25 * scaleRatio
property int wizardBottomMargin: (isMobile) ? 150 : 25 * scaleRatio
property int wizardTopMargin: (isMobile) ? 15 * scaleRatio : 50
+ // Storing wallet in Settings object doesn't work in qt 5.8 on android
+ property var m_wallet;
property var paths: {
// "create_wallet" : [welcomePage, optionsPage, createWalletPage, passwordPage, donationPage, finishPage ],
@@ -137,9 +139,8 @@ ColumnLayout {
function openOpenWalletPage() {
console.log("open wallet from file page");
- if (typeof wizard.settings['wallet'] !== 'undefined') {
- settings.wallet.destroy();
- delete wizard.settings['wallet'];
+ if (typeof m_wallet !== 'undefined' && m_wallet != null) {
+ walletManager.closeWallet()
}
optionsPage.onPageClosed(settings)
wizard.openWalletFromFileClicked();
@@ -203,11 +204,10 @@ ColumnLayout {
var new_wallet_filename = createWalletPath(settings.wallet_path,settings.account_name)
if(isIOS) {
console.log("saving in ios: "+ moneroAccountsDir + new_wallet_filename)
- settings.wallet.store(moneroAccountsDir + new_wallet_filename);
+ m_wallet.store(moneroAccountsDir + new_wallet_filename);
} else {
console.log("saving in wizard: "+ new_wallet_filename)
- settings.wallet.store(new_wallet_filename);
-
+ m_wallet.store(new_wallet_filename);
}
@@ -217,7 +217,7 @@ ColumnLayout {
oshelper.removeTemporaryWallet(settings.tmp_wallet_filename)
// protecting wallet with password
- settings.wallet.setPassword(settings.wallet_password);
+ m_wallet.setPassword(settings.wallet_password);
// Store password in session to be able to use password protected functions (e.g show seed)
appWindow.password = settings.wallet_password
diff --git a/wizard/WizardManageWalletUI.qml b/wizard/WizardManageWalletUI.qml
index c9470a1d..9c79672d 100644
--- a/wizard/WizardManageWalletUI.qml
+++ b/wizard/WizardManageWalletUI.qml
@@ -93,8 +93,8 @@ ColumnLayout {
ListModel {
id: dotsModel
- ListElement { dotColor: "#36B05B" }
- //ListElement { dotColor: "#DBDBDB" }
+ ListElement { dotColor: "#FFE00A" }
+ ListElement { dotColor: "#DBDBDB" }
ListElement { dotColor: "#DBDBDB" }
ListElement { dotColor: "#DBDBDB" }
}
diff --git a/wizard/WizardPassword.qml b/wizard/WizardPassword.qml
index 0b5b4282..3ce6584d 100644
--- a/wizard/WizardPassword.qml
+++ b/wizard/WizardPassword.qml
@@ -64,7 +64,6 @@ ColumnLayout {
function onPageClosed(settingsObject) {
// TODO: set password on the final page
- // settingsObject.wallet.setPassword(passwordItem.password)
settingsObject['wallet_password'] = passwordUI.password
return true
}
@@ -82,8 +81,8 @@ ColumnLayout {
ListModel {
id: dotsModel
ListElement { dotColor: "#36B05B" }
- ListElement { dotColor: "#36B05B" }
- //ListElement { dotColor: "#FFE00A" }
+ ListElement { dotColor: "#FFE00A" }
+ ListElement { dotColor: "#DBDBDB" }
ListElement { dotColor: "#DBDBDB" }
}
diff --git a/wizard/WizardRecoveryWallet.qml b/wizard/WizardRecoveryWallet.qml
index 240641e0..ed92ce1c 100644
--- a/wizard/WizardRecoveryWallet.qml
+++ b/wizard/WizardRecoveryWallet.qml
@@ -92,7 +92,7 @@ ColumnLayout {
var success = wallet.status === Wallet.Status_Ok;
if (success) {
- settingsObject['wallet'] = wallet;
+ m_wallet = wallet;
settingsObject['is_recovering'] = true;
settingsObject['tmp_wallet_filename'] = tmp_wallet_filename
} else {