Skip to content

refactor: lift hideBalance state to parent composable#755

Merged
jvsena42 merged 2 commits intomasterfrom
refactor/lift-balance-visibility-state
Feb 8, 2026
Merged

refactor: lift hideBalance state to parent composable#755
jvsena42 merged 2 commits intomasterfrom
refactor/lift-balance-visibility-state

Conversation

@jvsena42
Copy link
Member

Solves #752 (comment)

This PR lifts the hideBalance state from ActivityDetailContent to its parent ActivityDetailScreen, following the parent-child composable pattern.

Description

The ActivityDetailContent composable was accessing settingsViewModel directly instead of receiving state as a parameter from its parent. This violated the CLAUDE.md rule: "ALWAYS split screen composables into parent accepting viewmodel + inner private child accepting state and callbacks".

Changes:

  1. Moves settingsViewModel and hideBalance state access to parent ActivityDetailScreen
  2. Adds hideBalance: Boolean parameter to ActivityDetailContent
  3. Passes state from parent to child

Preview

N/A - No visual changes, refactoring only

QA Notes

1. Hide balance on activity detail

  1. Open the wallet
  2. Swipe on the balance to hide it
  3. Tap on any activity in the list
  4. Verify the header balance shows • • • • • • • • •
  5. Verify the payment amount shows • • • • •
  6. Verify the fee amount shows • • • • • (if applicable)

2. Show balance on activity detail

  1. Ensure balance is visible (not hidden)
  2. Tap on any activity
  3. Verify all amounts display correctly with proper currency formatting

@claude

This comment has been minimized.

@jvsena42 jvsena42 self-assigned this Jan 30, 2026
@jvsena42 jvsena42 enabled auto-merge January 30, 2026 12:11
@claude
Copy link

claude bot commented Feb 2, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Copy link
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utAck

@jvsena42 jvsena42 merged commit 8cb5acb into master Feb 8, 2026
14 of 15 checks passed
@jvsena42 jvsena42 deleted the refactor/lift-balance-visibility-state branch February 8, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants