From 6c4fab1a20cb935c85a7f42fd4c1dc083dd8a0b7 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Mon, 10 Jan 2022 11:38:08 +0100 Subject: [PATCH] fix(@wallet): delete account fixes #4384 --- .../Wallet/popups/AccountSettingsModal.qml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ui/app/AppLayouts/Wallet/popups/AccountSettingsModal.qml b/ui/app/AppLayouts/Wallet/popups/AccountSettingsModal.qml index 9742bfbd6b..c08bf3cac4 100644 --- a/ui/app/AppLayouts/Wallet/popups/AccountSettingsModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/AccountSettingsModal.qml @@ -146,16 +146,8 @@ ModalPopup { text: qsTrId("a-deleted-account-cannot-be-retrieved-later.-only-press-yes-if-you-backed-up-your-key/seed-or-don't-care-about-this-account-anymore") icon: StandardIcon.Warning standardButtons: StandardButton.Yes | StandardButton.No - onAccepted: { - const error = RootStore.deleteAccount(currentAccount.address) - if (error) { - errorSound.play() - deleteError.text = error - deleteError.open() - return - } - - // Change active account to the first + onYes: { + RootStore.deleteAccount(currentAccount.address)// Change active account to the first changeSelectedAccount(0) popup.close(); }