fix(@wallet): delete account

fixes #4384
This commit is contained in:
Anthony Laibe 2022-01-10 11:38:08 +01:00 committed by Anthony Laibe
parent 8889bbdb08
commit 6c4fab1a20
1 changed files with 2 additions and 10 deletions

View File

@ -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") 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 icon: StandardIcon.Warning
standardButtons: StandardButton.Yes | StandardButton.No standardButtons: StandardButton.Yes | StandardButton.No
onAccepted: { onYes: {
const error = RootStore.deleteAccount(currentAccount.address) RootStore.deleteAccount(currentAccount.address)// Change active account to the first
if (error) {
errorSound.play()
deleteError.text = error
deleteError.open()
return
}
// Change active account to the first
changeSelectedAccount(0) changeSelectedAccount(0)
popup.close(); popup.close();
} }