Skip to content

Feat/reorg onboarding notifications reviews#107

Merged
kcw-grunt merged 3 commits into
developfrom
feat/reorg-onboarding-notifications-reviews
Apr 28, 2026
Merged

Feat/reorg onboarding notifications reviews#107
kcw-grunt merged 3 commits into
developfrom
feat/reorg-onboarding-notifications-reviews

Conversation

@kcw-grunt

@kcw-grunt kcw-grunt commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

📱 Description

This PR reorganizes the onboarding notification flow by introducing a new SignupAskView that prompts users for push notification permissions after passcode setup. The change integrates Firebase Cloud Messaging request handling into the view model, adds comprehensive unit tests for the notification registration flow, and corrects wallet restoration logic flags across multiple onboarding views.

Platform

  • iOS

🎯 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔧 Refactoring (code change that neither fixes a bug nor adds a feature)
  • 📚 Documentation update
  • 🎨 UI/UX improvement
  • ⚡ Performance improvement
  • 🧪 Test addition or improvement
  • ⚙️ CI/CD change

📋 Changes

New Components Added

  • SignupAskView.swift – New onboarding screen that prompts users for push notification permissions with "Yes! Send me updates!" and "Maybe later (Skip)" actions. Routes to either .inputWordsView (restore) or .yourSeedWordsView (new wallet) based on restoration flag.
  • SignupAskViewTests.swift – Unit test suite covering navigation flows (new/restore wallets), skip action behavior, notification registration callbacks, back button safety, and ViewModel property publishing.

Modifications

  • AppDelegate.swift – Refactored launchFCMessaging() to accept a completion handler instead of taking UIApplication as parameter; changed application.registerForRemoteNotifications() to UIApplication.shared.registerForRemoteNotifications() and adjusted completion callback logic.
  • NewMainViewModel.swift – Added @Published var didRegisterForNotifications: Bool property and new requestNotificationPermissions() method that calls AppDelegate.launchFCMessaging() and updates the published flag.
  • NewMainView.swift – Removed requestRatingReview() method and its call site from the .onChange(of: newMainViewModel.transactions) handler.
  • StartView.swift – Added new case .signupAskView(isRestoringAnOldWallet: Bool) navigation case that instantiates SignupAskView; added corresponding case to Onboarding enum.
  • ConfirmPasscodeView.swift – Changed passcode confirmation success path to append .signupAskView(isRestoringAnOldWallet: isRestoringAnOldWallet) instead of conditionally routing to .yourSeedWordsView or .inputWordsView directly.
  • ReadyView.swift – Corrected "Create new wallet" button to pass isRestoringAnOldWallet: false (was incorrectly true).
  • RestoreView.swift – Corrected "Restore existing wallet" button to pass isRestoringAnOldWallet: true (was incorrectly false).
  • Localizable.xcstrings – Updated localization strings (changes not detailed in diff but file included in change set).
  • brainwallet.xcodeproj/project.pbxproj – Updated Xcode project to reference new test file and view file.

Removals

  • None

📊 Statistics

  • Additions: 25,301 lines
  • Deletions: 25,007 lines
  • Files Changed: 11
  • Commits: 2

🧪 Tests Status

  • Tests ran successfully locally?
  • Added or updated unit tests?
  • Added or updated UI tests?
  • Code coverage percentage of the codebase: __%

🎯 Reviewers

@josikie

@kcw-grunt
kcw-grunt requested a review from josikie April 28, 2026 20:16
@kcw-grunt kcw-grunt self-assigned this Apr 28, 2026
@gruntsoftware gruntsoftware deleted a comment from github-actions Bot Apr 28, 2026
Languages: ar, de, es-419, fa-IR, fr, hi, id, it, ja, ko, pa, pl, pt-BR, nl, ru, sv, th, tr, uk, zh-Hans, zh-Hant
Triggered by: 41f441f
@kcw-grunt kcw-grunt closed this Apr 28, 2026
@kcw-grunt kcw-grunt reopened this Apr 28, 2026
@kcw-grunt
kcw-grunt merged commit 281071c into develop Apr 28, 2026
0 of 2 checks passed
@kcw-grunt
kcw-grunt deleted the feat/reorg-onboarding-notifications-reviews branch April 28, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant