fix(Profile): ensure backup seedphrase warning disappears
The warning to back up the seedphrase should disappear after either dismissing the message, or in fact backing up the seed phrase. The latter was not happening because the banner didn't take that information into account. This commit fixes this by ensuring we let the banner know whether the seed phrase was already backed up. Notice that we don't want to render the banner when the seed phrase has *not* been backed up yet, but was dismissed by the user. Fixes #6255
This commit is contained in:
parent
264a0410b3
commit
04037d1d64
|
@ -231,8 +231,15 @@ StatusAppTwoPanelLayout {
|
|||
ModuleWarning {
|
||||
id: secureYourSeedPhrase
|
||||
width: parent.width
|
||||
visible: profileContainer.currentIndex === Constants.settingsSubsection.profile &&
|
||||
!profileView.store.profileStore.userDeclinedBackupBanner
|
||||
visible: {
|
||||
if (profileContainer.currentIndex !== Constants.settingsSubsection.profile) {
|
||||
return false
|
||||
}
|
||||
if (profileView.store.profileStore.userDeclinedBackupBanner) {
|
||||
return false
|
||||
}
|
||||
return !profileView.store.profileStore.privacyStore.mnemonicBackedUp
|
||||
}
|
||||
color: Style.current.red
|
||||
btnWidth: 100
|
||||
text: qsTr("Secure your seed phrase")
|
||||
|
|
|
@ -14,6 +14,8 @@ QtObject {
|
|||
property string profileLargeImage: userProfile.largeImage
|
||||
property string icon: userProfile.icon
|
||||
property bool userDeclinedBackupBanner: localAccountSensitiveSettings.userDeclinedBackupBanner
|
||||
property var privacyStore: profileSectionModule.privacyModule
|
||||
|
||||
onUserDeclinedBackupBannerChanged: {
|
||||
if (userDeclinedBackupBanner !== localAccountSensitiveSettings.userDeclinedBackupBanner) {
|
||||
localAccountSensitiveSettings.userDeclinedBackupBanner = userDeclinedBackupBanner
|
||||
|
|
Loading…
Reference in New Issue