mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-22 10:44:46 +00:00
commit
55f4858a40
1 changed files with 14 additions and 15 deletions
29
main.qml
29
main.qml
|
@ -173,19 +173,20 @@ ApplicationWindow {
|
||||||
function closeWallet() {
|
function closeWallet() {
|
||||||
|
|
||||||
// Disconnect all listeners
|
// Disconnect all listeners
|
||||||
currentWallet.refreshed.disconnect(onWalletRefresh)
|
if (typeof currentWallet !== "undefined" && currentWallet !== null) {
|
||||||
currentWallet.updated.disconnect(onWalletUpdate)
|
currentWallet.refreshed.disconnect(onWalletRefresh)
|
||||||
currentWallet.newBlock.disconnect(onWalletNewBlock)
|
currentWallet.updated.disconnect(onWalletUpdate)
|
||||||
currentWallet.moneySpent.disconnect(onWalletMoneySent)
|
currentWallet.newBlock.disconnect(onWalletNewBlock)
|
||||||
currentWallet.moneyReceived.disconnect(onWalletMoneyReceived)
|
currentWallet.moneySpent.disconnect(onWalletMoneySent)
|
||||||
currentWallet.transactionCreated.disconnect(onTransactionCreated)
|
currentWallet.moneyReceived.disconnect(onWalletMoneyReceived)
|
||||||
currentWallet.connectionStatusChanged.disconnect(onWalletConnectionStatusChanged)
|
currentWallet.transactionCreated.disconnect(onTransactionCreated)
|
||||||
middlePanel.paymentClicked.disconnect(handlePayment);
|
currentWallet.connectionStatusChanged.disconnect(onWalletConnectionStatusChanged)
|
||||||
middlePanel.sweepUnmixableClicked.disconnect(handleSweepUnmixable);
|
middlePanel.paymentClicked.disconnect(handlePayment);
|
||||||
middlePanel.checkPaymentClicked.disconnect(handleCheckPayment);
|
middlePanel.sweepUnmixableClicked.disconnect(handleSweepUnmixable);
|
||||||
|
middlePanel.checkPaymentClicked.disconnect(handleCheckPayment);
|
||||||
walletManager.closeWalletAsync();
|
}
|
||||||
currentWallet = undefined;
|
currentWallet = undefined;
|
||||||
|
walletManager.closeWalletAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
function connectWallet(wallet) {
|
function connectWallet(wallet) {
|
||||||
|
@ -227,8 +228,6 @@ ApplicationWindow {
|
||||||
console.error("Error opening wallet with empty password: ", wallet.errorString);
|
console.error("Error opening wallet with empty password: ", wallet.errorString);
|
||||||
console.log("closing wallet async : " + wallet.address)
|
console.log("closing wallet async : " + wallet.address)
|
||||||
closeWallet();
|
closeWallet();
|
||||||
currentWallet = undefined
|
|
||||||
|
|
||||||
// try to open wallet with password;
|
// try to open wallet with password;
|
||||||
passwordDialog.open(wallet.path);
|
passwordDialog.open(wallet.path);
|
||||||
} else {
|
} else {
|
||||||
|
@ -240,7 +239,6 @@ ApplicationWindow {
|
||||||
informationPopup.icon = StandardIcon.Critical
|
informationPopup.icon = StandardIcon.Critical
|
||||||
console.log("closing wallet async : " + wallet.address)
|
console.log("closing wallet async : " + wallet.address)
|
||||||
closeWallet();
|
closeWallet();
|
||||||
currentWallet = undefined
|
|
||||||
informationPopup.open()
|
informationPopup.open()
|
||||||
informationPopup.onCloseCallback = function() {
|
informationPopup.onCloseCallback = function() {
|
||||||
passwordDialog.open(wallet.path)
|
passwordDialog.open(wallet.path)
|
||||||
|
@ -616,6 +614,7 @@ ApplicationWindow {
|
||||||
walletInitialized = false;
|
walletInitialized = false;
|
||||||
splashCounter = 0;
|
splashCounter = 0;
|
||||||
closeWallet();
|
closeWallet();
|
||||||
|
currentWallet = undefined;
|
||||||
wizard.restart();
|
wizard.restart();
|
||||||
rootItem.state = "wizard"
|
rootItem.state = "wizard"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue