continue recovering from seed on open if not finished

This commit is contained in:
Jacob Brydolf 2016-10-10 21:40:58 +02:00
parent 625ae77945
commit a88c031510
No known key found for this signature in database
GPG Key ID: DE46246550D2F3C5
1 changed files with 10 additions and 4 deletions

View File

@ -158,7 +158,6 @@ ApplicationWindow {
}
console.log("using wizard wallet")
connectWallet(wizard.settings['wallet'])
isNewWallet = true
@ -183,7 +182,9 @@ ApplicationWindow {
currentWallet.moneySpent.connect(onWalletMoneySent)
currentWallet.moneyReceived.connect(onWalletMoneyReceived)
console.log("initializing with daemon address: ", persistentSettings.daemon_address)
currentWallet.initAsync(persistentSettings.daemon_address, 0);
console.log("Recovering from seed: ", persistentSettings.is_recovering)
console.log("restore Height", persistentSettings.restore_height)
currentWallet.initAsync(persistentSettings.daemon_address, 0, persistentSettings.is_recovering, persistentSettings.restore_height);
}
function walletPath() {
@ -244,7 +245,6 @@ ApplicationWindow {
leftPanel.daemonProgress.updateProgress(dCurrentBlock,dTargetBlock);
// Store wallet after first refresh. To prevent broken wallet after a crash
// TODO: Move this to libwallet?
if(isNewWallet && currentWallet.blockChainHeight() > 0){
currentWallet.store(persistentSettings.wallet_path)
isNewWallet = false
@ -257,6 +257,11 @@ ApplicationWindow {
walletInitialized = true
}
// recovering from seed is finished after first refresh
if(persistentSettings.is_recovering) {
persistentSettings.is_recovering = false
}
leftPanel.networkStatus.connected = currentWallet.connected
onWalletUpdate();
@ -445,7 +450,8 @@ ApplicationWindow {
property bool testnet: true
property string daemon_address: "localhost:38081"
property string payment_id
property int restore_height:0
property int restore_height : 0
property bool is_recovering : false
}
// TODO: replace with customized popups