diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2019-04-28 22:02:44 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2019-04-28 22:02:44 -0500 |
| commit | 002404227fee20ba5a74db40f752886f14cdeeac (patch) | |
| tree | 2b1a76825f2986e3a03dd8d63a20f4bac7152a3a /wizard | |
| parent | dff0a07a8a9767106d5e9ef7e3ee2f4afea6dda9 (diff) | |
| parent | e6a8fcd6cc40736021d3fddaf53ade28f38f0542 (diff) | |
| download | monzero-gui-002404227fee20ba5a74db40f752886f14cdeeac.tar.gz monzero-gui-002404227fee20ba5a74db40f752886f14cdeeac.tar.xz monzero-gui-002404227fee20ba5a74db40f752886f14cdeeac.zip | |
Merge pull request #2118
e6a8fcd Clean up m_wallet before opening new wallets (xmrdsc)
Diffstat (limited to 'wizard')
| -rw-r--r-- | wizard/WizardController.qml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/wizard/WizardController.qml b/wizard/WizardController.qml index c1fccc81..a317e544 100644 --- a/wizard/WizardController.qml +++ b/wizard/WizardController.qml @@ -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 |
