Skip to content

refactor(send): replace imperative lifecycle tracking with declarative state#1160

Draft
parrth20 wants to merge 1 commit into
joinmarket-webui:v2from
parrth20:v2-coinjoin-send-followup
Draft

refactor(send): replace imperative lifecycle tracking with declarative state#1160
parrth20 wants to merge 1 commit into
joinmarket-webui:v2from
parrth20:v2-coinjoin-send-followup

Conversation

@parrth20
Copy link
Copy Markdown
Member

@parrth20 parrth20 commented Mar 2, 2026

Follow-up to #1136. removes the imperative collaborativeLifecycleRef, verifyCollaborativeCompletion while-loop, and setInterval wallet refresh,
coinjoin completion is now detected declaratively by tracking jmSession.coinjoin_in_process transitions.
changes overview which i have made
removed collaborativeLifecycleRef, currentUtxoSnapshotRef, refetchWalletInfoRef
removed while-loop with hardcoded delay
detected completion via previousCoinjoinRunningRef (running → stopped)

ping @theborakompanioni

…e state

- Remove collaborativeLifecycleRef, currentUtxoSnapshotRef, refetchWalletInfoRef
- Remove verifyCollaborativeCompletion while-loop with hardcoded delay
- Remove setInterval-based wallet info refresh during collaborative flow
- Detect coinjoin completion declaratively via previousCoinjoinRunningRef
  tracking the running->stopped transition from jmSession state
- Simplify onPaymentConfirmed and onAbortCoinjoin handlers
@parrth20 parrth20 added this to the v2 milestone Mar 2, 2026
@parrth20 parrth20 self-assigned this Mar 2, 2026
@parrth20 parrth20 added refactoring Code refactoring without functional changes v2 Related to the redesigned v2 release labels Mar 2, 2026
@parrth20 parrth20 marked this pull request as draft March 23, 2026 21:44
@parrth20 parrth20 marked this pull request as draft March 23, 2026 21:44
@parrth20 parrth20 marked this pull request as draft March 23, 2026 21:44
@theborakompanioni
Copy link
Copy Markdown
Collaborator

Hey @parrth20, is it okay for you to have this on hold for a little bit longer? Next I want to tackle detecting when a utxo has been spent and fixing the cancellation of taker operations.

@parrth20
Copy link
Copy Markdown
Member Author

Hey @parrth20, is it okay for you to have this on hold for a little bit longer? Next I want to tackle detecting when a utxo has been spent and fixing the cancellation of taker operations.

okay I'll keep this branch aside, do lmk when i can continue !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Code refactoring without functional changes v2 Related to the redesigned v2 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants