Skip to content

fix: update balance on channel close from connections#774

Merged
jvsena42 merged 3 commits intomasterfrom
fix/balance-update-channel-closing
Feb 10, 2026
Merged

fix: update balance on channel close from connections#774
jvsena42 merged 3 commits intomasterfrom
fix/balance-update-channel-closing

Conversation

@jvsena42
Copy link
Copy Markdown
Member

@jvsena42 jvsena42 commented Feb 10, 2026

Fixes #721

Description

This PR creates a transfer activity record when closing a channel from the Connections screen, matching the existing behavior in the Transfer to Savings flow.

When closing via Connections > Detail > Close Connection, no TransferEntity was created, so DeriveBalanceStateUseCase had no record to subtract the closing channel's balance from the displayed spending total. The Transfer to Savings flow already handled this correctly by calling transferRepo.createTransfer() with type COOP_CLOSE after a successful close.

Preview

Screen_recording_20260210_141203.webm

QA Notes

  1. Setup a wallet with 2 open channels
  2. Navigate to Settings > Connections
  3. Select a channel and tap "Close Connection"
  4. Verify the spending balance on the home screen decreases after the close
  5. Force stop and reopen the app -- verify the balance remains correct

@jvsena42 jvsena42 self-assigned this Feb 10, 2026
@jvsena42 jvsena42 marked this pull request as ready for review February 10, 2026 17:35
@jvsena42 jvsena42 requested a review from ovitrif February 10, 2026 17:36
@jvsena42 jvsena42 enabled auto-merge February 10, 2026 17:36
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Feb 10, 2026

Code review

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

@jvsena42
Copy link
Copy Markdown
Member Author

the transfer card was eventually dismissed after the channel closing confirmation

Copy link
Copy Markdown
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

Nice fix!

@jvsena42 jvsena42 merged commit cd71e00 into master Feb 10, 2026
11 checks passed
@jvsena42 jvsena42 deleted the fix/balance-update-channel-closing branch February 10, 2026 18:24
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.

Android channel closed via Connections > Detail > Close Connection didn't result in balance update on home

2 participants