feat(wallet): CrowdNode show balance message#779
Open
romchornyi wants to merge 7 commits into
Open
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@DashWallet/Sources/UI/CrowdNode/BalanceReminder/CrowdNodeWithdrawalRouter.swift`:
- Around line 93-100: The mainAction closure in the CrowdNodeWithdrawalRouter
captures navigationController strongly, creating a retain cycle since
navigationController owns the controller that contains this closure. Modify the
closure definition to use weak capture for navigationController by adding a
capture list at the beginning of the closure (after the opening brace), and then
safely unwrap navigationController before using it in the pushViewController
call to ensure it remains valid and the reference cycle is broken.
In `@DashWallet/Sources/UI/Home/HomeViewController.swift`:
- Around line 529-535: Replace the force unwrap of invitationSetup.invitation in
the handleDeeplink call within the DASHPAY conditional block of
HomeViewController with a safe guard let statement. Instead of using
invitation!, use guard let to safely unwrap the invitation property and only
proceed with the handleDeeplink call if the invitation is present, otherwise
skip the operation.
In `@DashWallet/Sources/UI/SwiftUI` Components/SelfSizingSheet.swift:
- Around line 50-54: Remove the debug print statement in the detents computed
property of the SelfSizingSheet class. The line `print("\(height)")` executes in
production builds and should not be included unless wrapped in a `#if DEBUG`
block. Since this appears to be a temporary debug statement, delete this line
entirely to clean up the code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 35da2df1-9355-427f-b913-b1e7489dd9cb
📒 Files selected for processing (8)
DashWallet.xcodeproj/project.pbxprojDashWallet/Sources/Models/CrowdNode/CrowdNodeBalanceReminder.swiftDashWallet/Sources/UI/CrowdNode/BalanceReminder/CrowdNodeBalanceReminderBanner.swiftDashWallet/Sources/UI/CrowdNode/BalanceReminder/CrowdNodeBalanceReminderSheet.swiftDashWallet/Sources/UI/CrowdNode/BalanceReminder/CrowdNodeWithdrawalRouter.swiftDashWallet/Sources/UI/Explore Dash/ExploreMenuScreen.swiftDashWallet/Sources/UI/Home/HomeViewController.swiftDashWallet/Sources/UI/SwiftUI Components/SelfSizingSheet.swift
Update balance reminder messaging and UI components for better clarity: - Improve CrowdNodeBalanceReminderBanner and CrowdNodeBalanceReminderSheet messaging - Update CrowdNode.swift balance calculation logic - Enhance MayaAmountView formatting - Improve LocalCurrencyView display - Remove unused geometry reader utilities (FrameReader, LocationReader, ScaleToFitWidth) - Remove unused ScrollViewWithOnScrollChanged component - Update project configuration
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@DashWallet/Sources/Models/CrowdNode/CrowdNode.swift`:
- Around line 216-221: The restore flow in CrowdNode.swift is currently calling
refreshBalance(), which republishs prefs.lastKnownBalance before the network
fetch completes and can wrongly trigger CrowdNodeBalanceReminder from stale
cached data. Update the restore-specific path in the restore logic around the
refreshBalance() call to avoid seeding balance from cache, or gate reminder
publication until the first fresh balance fetch finishes. Keep the fix localized
to the balance refresh/reminder flow so the normal refreshBalance() behavior for
other entry points remains unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a273f069-ca2e-42ee-99b9-a7cf6177f9c5
📒 Files selected for processing (13)
DashWallet.xcodeproj/project.pbxprojDashWallet/Sources/Models/CrowdNode/CrowdNode.swiftDashWallet/Sources/UI/CrowdNode/BalanceReminder/CrowdNodeBalanceReminderBanner.swiftDashWallet/Sources/UI/CrowdNode/BalanceReminder/CrowdNodeBalanceReminderSheet.swiftDashWallet/Sources/UI/CrowdNode/BalanceReminder/CrowdNodeWithdrawalRouter.swiftDashWallet/Sources/UI/Explore Dash/ExploreMenuScreen.swiftDashWallet/Sources/UI/Home/HomeViewController.swiftDashWallet/Sources/UI/Maya/Convert/Components/MayaAmountView.swiftDashWallet/Sources/UI/Menu/Settings/LocalCurrency/LocalCurrencyView.swiftDashWallet/Sources/UI/SwiftUI Components/Geometry Readers/FrameReader.swiftDashWallet/Sources/UI/SwiftUI Components/Geometry Readers/LocationReader.swiftDashWallet/Sources/UI/SwiftUI Components/Geometry Readers/ScaleToFitWidth.swiftDashWallet/Sources/UI/SwiftUI Components/ScrollViews/ScrollViewWithOnScrollChanged.swift
💤 Files with no reviewable changes (4)
- DashWallet/Sources/UI/SwiftUI Components/Geometry Readers/ScaleToFitWidth.swift
- DashWallet/Sources/UI/SwiftUI Components/Geometry Readers/FrameReader.swift
- DashWallet/Sources/UI/SwiftUI Components/Geometry Readers/LocationReader.swift
- DashWallet/Sources/UI/SwiftUI Components/ScrollViews/ScrollViewWithOnScrollChanged.swift
✅ Files skipped from review due to trivial changes (1)
- DashWallet/Sources/UI/Menu/Settings/LocalCurrency/LocalCurrencyView.swift
🚧 Files skipped from review as they are similar to previous changes (3)
- DashWallet/Sources/UI/CrowdNode/BalanceReminder/CrowdNodeBalanceReminderSheet.swift
- DashWallet/Sources/UI/Home/HomeViewController.swift
- DashWallet/Sources/UI/CrowdNode/BalanceReminder/CrowdNodeBalanceReminderBanner.swift
HashEngineering
previously approved these changes
Jun 29, 2026
- Update project.pbxproj build settings and references - Add SwiftPM Package.resolved for consistent dependencies - Configure development environment for CN balance message feature
abaranouski
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
This PR adds a CrowdNode balance reminder flow for users who still have funds associated with CrowdNode.
It solves the missing visibility around remaining CrowdNode balances by surfacing a reminder on the active Home flow and in Explore, and by giving users a direct path into the withdrawal flow.
What was done?
How Has This Been Tested?
Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit
New Features
Bug Fixes
Refactor