From f01bbcb92621340e9cbd10ef1d9c410d6ca26452 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Mon, 26 Apr 2021 11:23:14 -0400 Subject: [PATCH] fix: seedphrase backup endless loop Fixes #2232 --- .../Profile/Sections/BackupSeedModal.qml | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ui/app/AppLayouts/Profile/Sections/BackupSeedModal.qml b/ui/app/AppLayouts/Profile/Sections/BackupSeedModal.qml index 22975cdf16..d523445834 100644 --- a/ui/app/AppLayouts/Profile/Sections/BackupSeedModal.qml +++ b/ui/app/AppLayouts/Profile/Sections/BackupSeedModal.qml @@ -182,22 +182,22 @@ ModalPopup { color: Style.current.secondaryText } - ConfirmationDialog { - id: removeSeedPhraseConfirm - //% "Are you sure?" - title: qsTrId("are-you-sure?") - //% "You will not be able to see the whole seed phrase again" - confirmationText: qsTrId("are-you-sure-description") - onConfirmButtonClicked: { - profileModel.mnemonic.remove() - popup.close(); - removeSeedPhraseConfirm.close(); - } - onClosed: { - seedWord1Idx = -1; - seedWord2Idx = -1; - txtFieldWord.text = ""; - validationError = ""; + Component { + id: removeSeedPhraseConfirmDialogComponent + ConfirmationDialog { + id: confirmPopup + //% "Are you sure?" + title: qsTrId("are-you-sure?") + //% "You will not be able to see the whole seed phrase again" + confirmationText: qsTrId("are-you-sure-description") + onConfirmButtonClicked: { + profileModel.mnemonic.remove() + popup.close(); + confirmPopup.close(); + } + onClosed: { + destroy(); + } } } } @@ -260,7 +260,7 @@ ModalPopup { validationError = ""; txtFieldWord.text = ""; - removeSeedPhraseConfirm.open(); + openPopup(removeSeedPhraseConfirmDialogComponent); } } }