Qt wrapper for libwallet - in-progress

This commit is contained in:
Ilya Kitaev
2016-02-29 17:39:39 +03:00
parent 625041df18
commit 7d9306ca1a
8 changed files with 275 additions and 44 deletions

View File

@@ -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
}

View File

@@ -40,7 +40,7 @@ Item {
function buildSettingsString() {
var str = "<br>" + qsTr("<b>Language:</b> ") + wizard.settings['language'] + "<br>"
+ qsTr("<b>Account name:</b> ") + wizard.settings['account_name'] + "<br>"
+ qsTr("<b>Words:</b> ") + wizard.settings['words'] + "<br>"
+ qsTr("<b>Words:</b> ") + wizard.settings['wallet'].seed + "<br>"
+ qsTr("<b>Wallet Path: </b>") + wizard.settings['wallet_path'] + "<br>"
+ qsTr("<b>Enable auto donation: </b>") + wizard.settings['auto_donations_enabled'] + "<br>"
+ qsTr("<b>Auto donation amount: </b>") + wizard.settings['auto_donations_amount'] + "<br>"

View File

@@ -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

View File

@@ -46,6 +46,10 @@ Item {
settingsObject['wallet_path'] = uiItem.walletPath
}
function recoveryWallet() {
}
WizardManageWalletUI {
id: uiItem
accountNameText: qsTr("My account name")