WalletManager: async close with splash screen

This commit is contained in:
xiphon
2019-07-02 10:57:37 +00:00
parent c4b3fbae1d
commit ab9e31e7cc
4 changed files with 34 additions and 30 deletions

View File

@@ -208,10 +208,11 @@ Rectangle {
confirmationDialog.icon = StandardIcon.Question
confirmationDialog.cancelText = qsTr("Cancel")
confirmationDialog.onAcceptedCallback = function() {
walletManager.closeWallet();
walletManager.clearWalletCache(persistentSettings.wallet_path);
walletManager.openWalletAsync(persistentSettings.wallet_path, appWindow.walletPassword,
persistentSettings.nettype, persistentSettings.kdfRounds);
appWindow.closeWallet(function() {
walletManager.clearWalletCache(persistentSettings.wallet_path);
walletManager.openWalletAsync(persistentSettings.wallet_path, appWindow.walletPassword,
persistentSettings.nettype, persistentSettings.kdfRounds);
});
}
confirmationDialog.onRejectedCallback = null;