Fix the Setup Recovery flow from the home screen banner. (#3483)

This commit is contained in:
Doug
2024-11-05 10:52:51 +00:00
committed by GitHub
parent 85d497a4d2
commit f3a15f7937
5 changed files with 13 additions and 3 deletions
@@ -16,6 +16,7 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View {
var title: String { requiresExtraAccountSetup ? L10n.bannerSetUpRecoveryTitle : L10n.confirmRecoveryKeyBannerTitle }
var message: String { requiresExtraAccountSetup ? L10n.bannerSetUpRecoveryContent : L10n.confirmRecoveryKeyBannerMessage }
var actionTitle: String { requiresExtraAccountSetup ? L10n.bannerSetUpRecoverySubmit : L10n.confirmRecoveryKeyBannerPrimaryButtonTitle }
var primaryAction: HomeScreenViewAction { requiresExtraAccountSetup ? .setupRecovery : .confirmRecoveryKey }
var body: some View {
VStack(spacing: 16) {
@@ -56,7 +57,7 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View {
var buttons: some View {
VStack(spacing: 16) {
Button(actionTitle) {
context.send(viewAction: .manageRecoveryKey)
context.send(viewAction: primaryAction)
}
.frame(maxWidth: .infinity)
.buttonStyle(.compound(.primary, size: .medium))