diff options
| author | Riccardo Spagni <ric@spagni.net> | 2016-11-05 10:06:55 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2016-11-05 10:06:55 +0200 |
| commit | 6142afdb7b1bec2a8fc0642a36dc67da1da01d0a (patch) | |
| tree | b4a65526f4029bac1b53276e55aad1b2668c5872 /wizard/WizardCreateWallet.qml | |
| parent | 6c6b10855f23195cb2b6bd2acd45995947592997 (diff) | |
| parent | e6fe9d3045100daa9c5b45507ba5c16ad2b54e27 (diff) | |
| download | monzero-gui-6142afdb7b1bec2a8fc0642a36dc67da1da01d0a.tar.gz monzero-gui-6142afdb7b1bec2a8fc0642a36dc67da1da01d0a.tar.xz monzero-gui-6142afdb7b1bec2a8fc0642a36dc67da1da01d0a.zip | |
Merge pull request #93
e6fe9d3 wizard: empty seed box on page load (Jacob Brydolf)
776a591 Wizard: Delete old wallet object before creating new (Jacob Brydolf)
c873da7 added debug message on wallet close (Jacob Brydolf)
9afa5d7 wizard: updated open from file icon (Jacob Brydolf)
d637b58 wizard: warn user if wallet exists in path (Jacob Brydolf)
e09ccd3 open last opened wallet on gui start. (Jacob Brydolf)
1218bf3 Capitalized Monero in default path (Jacob Brydolf)
6b7adbc refresh transaction history on wallet change (Jacob Brydolf)
fd67c61 show wizard if password dialog is closed (Jacob Brydolf)
6818ecd new wallet default path + open wallet from file (Jacob Brydolf)
0974490 wizard: default account name on recover page (Jacob Brydolf)
21414d7 wizardOptions: open from file button (Jacob Brydolf)
ec3d586 wizard: change default account name + validation nextButton (Jacob Brydolf)
469bb9f wizard: disable donation page (Jacob Brydolf)
1d0ddff wizard: open fallet from file (Jacob Brydolf)
12332ca settings: close wallet button (Jacob Brydolf)
675e35d wizard: skip language page if only 1 language is availible (Jacob Brydolf)
b795c4b generate default account name from env username (Jacob Brydolf)
a3c6c40 change default wallet path + remove auto create path on startup (Jacob Brydolf)
a34efed settings: remove daemon connection check (Jacob Brydolf)
49c022b Wizard: check pwd on page load (Jacob Brydolf)
Diffstat (limited to 'wizard/WizardCreateWallet.qml')
| -rw-r--r-- | wizard/WizardCreateWallet.qml | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/wizard/WizardCreateWallet.qml b/wizard/WizardCreateWallet.qml index 6d632cbe..bef91bc2 100644 --- a/wizard/WizardCreateWallet.qml +++ b/wizard/WizardCreateWallet.qml @@ -54,7 +54,8 @@ Item { settingsObject['account_name'] = uiItem.accountNameText settingsObject['words'] = uiItem.wordsTexttext settingsObject['wallet_path'] = uiItem.walletPath - return true; + var walletFullPath = wizard.createWalletPath(uiItem.walletPath,uiItem.accountNameText); + return !wizard.walletExists(walletFullPath); } function checkNextButton() { @@ -70,25 +71,24 @@ Item { // TODO: create wallet in temporary filename and a) move it to the path specified by user after the final // page submitted or b) delete it when program closed before reaching final page - var wallet_filename = oshelper.temporaryFilename(); - if (typeof settingsObject.wallet === 'undefined') { - //var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.language) - var testnet = appWindow.persistentSettings.testnet; - var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.wallet_language, - testnet) - 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 - } else { - print("wallet already created. we just stepping back"); + // Always delete the wallet object before creating new - we could be stepping back from recovering wallet + if (typeof settingsObject.wallet !== 'undefined') { + settingsObject.wallet.destroy() + console.log("deleting wallet") } + + var wallet_filename = oshelper.temporaryFilename(); + //var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.language) + var testnet = appWindow.persistentSettings.testnet; + var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.wallet_language, + testnet) + 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.wallet_filename = wallet_filename } - - - WizardManageWalletUI { id: uiItem titleText: qsTr("A new wallet has been created for you") + translationManager.emptyString |
