diff options
| author | Riccardo Spagni <ric@spagni.net> | 2016-10-24 10:36:44 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2016-10-24 10:36:44 +0200 |
| commit | 1ce6ef066bbfd849ed65c5480237d36c8222b3b8 (patch) | |
| tree | ed7c3bfcadb12b6f31b1a57b71572f7d4311a769 | |
| parent | 0b1695cfc99da348823fe7af8c992e63fe211367 (diff) | |
| parent | 415594460b88c9008bdf3f8af013364e9ab64dab (diff) | |
| download | monzero-gui-1ce6ef066bbfd849ed65c5480237d36c8222b3b8.tar.gz monzero-gui-1ce6ef066bbfd849ed65c5480237d36c8222b3b8.tar.xz monzero-gui-1ce6ef066bbfd849ed65c5480237d36c8222b3b8.zip | |
Merge pull request #73
4155944 remove wizardOpenWallet.qml - not ready yet (Jacob Brydolf)
0691b48 Don't send path as argument on wallet store (windows fix) (Jacob Brydolf)
9cc3dee Remove trailing slash on wallet_path (Jacob Brydolf)
fc2a086 corrected path on wallet store after refresh (Jacob Brydolf)
10d3d3f Save wallet after every refresh (Jacob Brydolf)
| -rw-r--r-- | main.qml | 11 | ||||
| -rw-r--r-- | wizard/WizardMain.qml | 6 |
2 files changed, 11 insertions, 6 deletions
@@ -245,12 +245,11 @@ ApplicationWindow { var dTargetBlock = currentWallet.daemonBlockChainTargetHeight(); leftPanel.daemonProgress.updateProgress(dCurrentBlock,dTargetBlock); - // Store wallet after first refresh. To prevent broken wallet after a crash - if(isNewWallet && currentWallet.blockChainHeight() > 0){ - currentWallet.store(persistentSettings.wallet_path) - isNewWallet = false - console.log("wallet stored after first successfull refresh") - } + // Store wallet after every refresh. + //TODO: Doesn't need path after creation. Change libwalletqt + currentWallet.store("") + console.log("Saving wallet"); + isNewWallet = false // initialize transaction history once wallet is initializef first time; if (!walletInitialized) { diff --git a/wizard/WizardMain.qml b/wizard/WizardMain.qml index 43200304..543ee14d 100644 --- a/wizard/WizardMain.qml +++ b/wizard/WizardMain.qml @@ -111,10 +111,16 @@ Rectangle { console.log("Here we apply the settings"); // here we need to actually move wallet to the new location + // Remove trailing slash - (default on windows and mac) + if (settings.wallet_path.substring(settings.wallet_path.length -1) === "/"){ + settings.wallet_path = settings.wallet_path.substring(0,settings.wallet_path.length -1) + } + var new_wallet_filename = settings.wallet_path + "/" + settings.account_name + "/" + settings.account_name; + console.log("saving to wizard: "+ new_wallet_filename) // moving wallet files to the new destination, if user changed it if (new_wallet_filename !== settings.wallet_filename) { // using previously saved wallet; |
