Skip to content

fix: add distinctUntilChanged before flatMapLatest on stateFlow-derived flows#868

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/distinctUntilChanged-flatMapLatest
Jun 5, 2026
Merged

fix: add distinctUntilChanged before flatMapLatest on stateFlow-derived flows#868
bmc08gt merged 1 commit into
code/cashfrom
fix/distinctUntilChanged-flatMapLatest

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds distinctUntilChanged() before flatMapLatest in TransactionHistoryViewModel, TokenInfoViewModel, and SendFlowViewModel to prevent unnecessary flow restarts when unrelated state changes re-emit the same derived value
  • Fixes transaction history screen flashing/jumping in a loading loop when viewing token history

@github-actions github-actions Bot added type: fix Bug fix area: payments Payments, transfers, intents, billing area: network gRPC, connectivity, API, exchange rates area: tokens Token accounts, balances, token info and removed type: fix Bug fix labels Jun 5, 2026
@bmc08gt bmc08gt force-pushed the fix/distinctUntilChanged-flatMapLatest branch from 1726ade to 06d1cdb Compare June 5, 2026 14:42
@github-actions github-actions Bot added the type: fix Bug fix label Jun 5, 2026
@bmc08gt bmc08gt force-pushed the fix/distinctUntilChanged-flatMapLatest branch from 06d1cdb to 861d710 Compare June 5, 2026 14:43
@bmc08gt bmc08gt self-assigned this Jun 5, 2026
…ed flows

Prevents unnecessary flow restarts (and UI flicker) when unrelated state
changes re-emit the same derived value through flatMapLatest.
@bmc08gt bmc08gt force-pushed the fix/distinctUntilChanged-flatMapLatest branch from 861d710 to 66b8f31 Compare June 5, 2026 14:46
@bmc08gt bmc08gt merged commit e2d087e into code/cash Jun 5, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/distinctUntilChanged-flatMapLatest branch June 5, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates area: payments Payments, transfers, intents, billing area: tokens Token accounts, balances, token info type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant