fix(@desktop/wallet): delete account

Fixes #4683
This commit is contained in:
Sale Djenic 2022-02-07 11:03:23 +01:00 committed by saledjenic
parent 5d0eb942b0
commit e7f1106f79
1 changed files with 2 additions and 9 deletions

View File

@ -146,15 +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) {
Global.playErrorSound();
deleteError.text = error
deleteError.open()
return
}
onYes: {
RootStore.deleteAccount(currentAccount.address)
// Change active account to the first
changeSelectedAccount(0)
popup.close();