From 7d9306ca1a661da015c59a0a991e028aeec0ee44 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Mon, 29 Feb 2016 17:39:39 +0300 Subject: Qt wrapper for libwallet - in-progress --- wizard/WizardCreateWallet.qml | 9 ++++++++- wizard/WizardFinish.qml | 2 +- wizard/WizardPassword.qml | 6 ++++-- wizard/WizardRecoveryWallet.qml | 4 ++++ 4 files changed, 17 insertions(+), 4 deletions(-) (limited to 'wizard') diff --git a/wizard/WizardCreateWallet.qml b/wizard/WizardCreateWallet.qml index 91b7447e..ce573e86 100644 --- a/wizard/WizardCreateWallet.qml +++ b/wizard/WizardCreateWallet.qml @@ -46,13 +46,19 @@ Item { settingsObject['wallet_path'] = uiItem.walletPath + var new_wallet_filename = settingsObject.wallet_path + "/" + settingsObject.account_name; // moving wallet files to the new destination, if user changed it if (new_wallet_filename !== settingsObject.wallet_filename) { - walletManager.moveWallet(settingsObject.wallet_filename, new_wallet_filename); + // using previously saved wallet; + settingsObject.wallet.rename(new_wallet_filename); + //walletManager.moveWallet(settingsObject.wallet_filename, new_wallet_filename); } + + // saving wallet_filename; + settingsObject['wallet_filename'] = new_wallet_filename; } function createWallet(settingsObject) { @@ -66,6 +72,7 @@ Item { } else { print("wallet already created. we just stepping back"); } + settingsObject.wallet_filename = wallet_filename } diff --git a/wizard/WizardFinish.qml b/wizard/WizardFinish.qml index 62975d8c..311dfd62 100644 --- a/wizard/WizardFinish.qml +++ b/wizard/WizardFinish.qml @@ -40,7 +40,7 @@ Item { function buildSettingsString() { var str = "
" + qsTr("Language: ") + wizard.settings['language'] + "
" + qsTr("Account name: ") + wizard.settings['account_name'] + "
" - + qsTr("Words: ") + wizard.settings['words'] + "
" + + qsTr("Words: ") + wizard.settings['wallet'].seed + "
" + qsTr("Wallet Path: ") + wizard.settings['wallet_path'] + "
" + qsTr("Enable auto donation: ") + wizard.settings['auto_donations_enabled'] + "
" + qsTr("Auto donation amount: ") + wizard.settings['auto_donations_amount'] + "
" diff --git a/wizard/WizardPassword.qml b/wizard/WizardPassword.qml index d3d033aa..1bcc6213 100644 --- a/wizard/WizardPassword.qml +++ b/wizard/WizardPassword.qml @@ -43,6 +43,10 @@ Item { onOpacityChanged: visible = opacity !== 0 + function saveSettings(settingsObject) { + settingsObject.wallet.setPassword(passwordItem.password) + } + function handlePassword() { // allow to forward step only if passwords match wizard.nextButton.enabled = passwordItem.password === retypePasswordItem.password @@ -54,8 +58,6 @@ Item { - - Row { id: dotsRow anchors.top: parent.top diff --git a/wizard/WizardRecoveryWallet.qml b/wizard/WizardRecoveryWallet.qml index 9093c59a..572d776b 100644 --- a/wizard/WizardRecoveryWallet.qml +++ b/wizard/WizardRecoveryWallet.qml @@ -46,6 +46,10 @@ Item { settingsObject['wallet_path'] = uiItem.walletPath } + function recoveryWallet() { + + } + WizardManageWalletUI { id: uiItem accountNameText: qsTr("My account name") -- cgit v1.2.3