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)
This commit is contained in:
Riccardo Spagni 2016-10-24 10:36:44 +02:00
commit 1ce6ef066b
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
2 changed files with 11 additions and 6 deletions

View file

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

View file

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