Skip to content

fix(direct-send): replace lossy SharedFlow resolve event with StateFlow state#830

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/send-flow-resolve-race
Jun 2, 2026
Merged

fix(direct-send): replace lossy SharedFlow resolve event with StateFlow state#830
bmc08gt merged 1 commit into
code/cashfrom
fix/send-flow-resolve-race

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

The resolve result was emitted via a SharedFlow (replay=0), which could be missed if the amount entry screen had not subscribed yet -- causing a spurious contact not on Flipcash error. Move resolve status into a ResolveState sealed interface on the ViewModel state (StateFlow, always replays current value). The amount screen now reads resolve state reactively and handles Pending/Failed/Resolved cases proactively.

Also embeds the DeviceContact in ResolveState to eliminate a separate event-based collector, and extracts a fallback display name into a string resource.

…ow state

The resolve result was emitted via a SharedFlow (replay=0), which could
be missed if the amount entry screen had not subscribed yet -- causing a
spurious contact not on Flipcash error. Move resolve status into a
ResolveState sealed interface on the ViewModel state (StateFlow, always
replays current value). The amount screen now reads resolve state
reactively and handles Pending/Failed/Resolved cases proactively.

Also embeds the DeviceContact in ResolveState to eliminate a separate
event-based collector, and extracts a fallback display name into a
string resource.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt self-assigned this Jun 2, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Jun 2, 2026
@bmc08gt bmc08gt added the area: payments Payments, transfers, intents, billing label Jun 2, 2026
@bmc08gt bmc08gt merged commit 1584e14 into code/cash Jun 2, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/send-flow-resolve-race branch June 2, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: payments Payments, transfers, intents, billing type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant