mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-09 19:32:03 +02:00
Clean up m_wallet before opening new wallets
This commit is contained in:
parent
e81cb7e640
commit
e6a8fcd6cc
@ -51,6 +51,9 @@ Rectangle {
|
|||||||
signal walletCreatedFromDevice(bool success)
|
signal walletCreatedFromDevice(bool success)
|
||||||
|
|
||||||
function restart() {
|
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"
|
wizardStateView.state = "wizardHome"
|
||||||
wizardController.walletOptionsName = defaultAccountName;
|
wizardController.walletOptionsName = defaultAccountName;
|
||||||
wizardController.walletOptionsLocation = '';
|
wizardController.walletOptionsLocation = '';
|
||||||
@ -71,6 +74,11 @@ Rectangle {
|
|||||||
wizardController.walletOptionsSubaddressLookahead = '';
|
wizardController.walletOptionsSubaddressLookahead = '';
|
||||||
wizardController.remoteNodes = {};
|
wizardController.remoteNodes = {};
|
||||||
disconnect();
|
disconnect();
|
||||||
|
|
||||||
|
if (typeof wizardController.m_wallet !== 'undefined'){
|
||||||
|
walletManager.closeWallet();
|
||||||
|
wizardController.m_wallet = undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property var m_wallet;
|
property var m_wallet;
|
||||||
@ -166,6 +174,9 @@ Rectangle {
|
|||||||
previousView.opacity = 0;
|
previousView.opacity = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(previousView !== null && currentView.viewName === "wizardHome")
|
||||||
|
wizardController.restart();
|
||||||
|
|
||||||
if (currentView) {
|
if (currentView) {
|
||||||
stackView.replace(currentView)
|
stackView.replace(currentView)
|
||||||
// Calls when view is opened
|
// Calls when view is opened
|
||||||
|
Loading…
Reference in New Issue
Block a user