Merge pull request #2118

e6a8fcd Clean up m_wallet before opening new wallets (xmrdsc)
pull/2/head
luigi1111 5 years ago
commit 002404227f
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

@ -51,6 +51,9 @@ Rectangle {
signal walletCreatedFromDevice(bool success)
function restart() {
// Clear up any state, including `m_wallet`, which
// is the temp. wallet object whilst creating new wallets.
// This function is called automatically by navigating to `wizardHome`.
wizardStateView.state = "wizardHome"
wizardController.walletOptionsName = defaultAccountName;
wizardController.walletOptionsLocation = '';
@ -71,6 +74,11 @@ Rectangle {
wizardController.walletOptionsSubaddressLookahead = '';
wizardController.remoteNodes = {};
disconnect();
if (typeof wizardController.m_wallet !== 'undefined'){
walletManager.closeWallet();
wizardController.m_wallet = undefined;
}
}
property var m_wallet;
@ -164,6 +172,9 @@ Rectangle {
}
}
if(previousView !== null && currentView.viewName === "wizardHome")
wizardController.restart();
if (currentView) {
stackView.replace(currentView)
// Calls when view is opened