mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-09 20:40:27 +00:00
remove unnecessary i/o
This commit is contained in:
parent
68736ab834
commit
7c9d2231cc
1 changed files with 11 additions and 7 deletions
18
main.qml
18
main.qml
|
@ -287,13 +287,17 @@ ApplicationWindow {
|
||||||
daemonSynced = (currentWallet.connected != Wallet.ConnectionStatus_Disconnected && dCurrentBlock >= dTargetBlock)
|
daemonSynced = (currentWallet.connected != Wallet.ConnectionStatus_Disconnected && dCurrentBlock >= dTargetBlock)
|
||||||
|
|
||||||
|
|
||||||
|
// Refresh is succesfull if blockchain height > 1
|
||||||
// Store wallet after every refresh.
|
|
||||||
if (currentWallet.blockChainHeight() > 1){
|
if (currentWallet.blockChainHeight() > 1){
|
||||||
|
|
||||||
//TODO: Doesn't need path after creation. Change libwalletqt
|
// Save new wallet after first refresh
|
||||||
currentWallet.store("")
|
// Wallet is nomrmally saved to disk on app exit. This prevents rescan from block 0 after app crash
|
||||||
console.log("Saving wallet");
|
if(isNewWallet){
|
||||||
|
console.log("Saving wallet after first refresh");
|
||||||
|
//TODO: Doesn't need path argument after creation. Change libwalletqt
|
||||||
|
currentWallet.store("")
|
||||||
|
isNewWallet = false
|
||||||
|
}
|
||||||
|
|
||||||
// recovering from seed is finished after first refresh
|
// recovering from seed is finished after first refresh
|
||||||
if(persistentSettings.is_recovering) {
|
if(persistentSettings.is_recovering) {
|
||||||
|
@ -301,7 +305,6 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isNewWallet = false
|
|
||||||
|
|
||||||
// initialize transaction history once wallet is initializef first time;
|
// initialize transaction history once wallet is initializef first time;
|
||||||
if (!walletInitialized) {
|
if (!walletInitialized) {
|
||||||
|
@ -969,6 +972,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClosing: {
|
onClosing: {
|
||||||
//walletManager.closeWallet(currentWallet);
|
// Close and save to disk on app close
|
||||||
|
walletManager.closeWallet(currentWallet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue