jam
jam copied to clipboard
Ability to stop a running taker operation
The only way to stop a running taker operation is to lock the wallet – that is not so intuitive.
At least in regtest, Makers who didnt respond
can happen quite often. Should the possibility to stop a single taker operation be considered? In the meantime, the workaround works fine.
Yeah definitely. A stop button that calls the '/taker/stop` endpoint would be great.
something like this? https://www.figma.com/file/kfejZJFlwBywvLEnPEmJo1/?node-id=3283%3A85776 if this is ok, then there should be a modal to double check with the user to confirm.

Looks good. I also like what you did with the tabs in that screenshot. 👌✨
An issue we currently have is that we cannot differentiate on the client between the a single collaborative transaction and a schedule of collaborative transactions running. This makes it impossible to treat a single collaborative transaction (Send) and the scheduler (Jam) differently -- therefore anytime either of them is "active" UI-wise, the other one needs to be as well. So we can show a "Stop" button on the send page but it will also show when the scheduler is running, which is weird.
I will check with the backend and see if we can get separate "running" flags for the scheduler and a single collaborative transaction. That will make things a lot easier:
- Correctly showing the activity indicator. Currently the "Jam" tab is showing indicating activity when a single collaborative transaction is running
- Showing a stop button on the Send page only when a single collaborative transaction is running
- Blurring the Send page only when the scheduler is running
- ...
So we can show a "Stop" button on the send page but it will also show when the scheduler is running, which is weird.
Can it be distinguished by checking if an API call to /schedule
returns 404
or 200
?
- If
taker_running := true
and/schedule
responds with404
: Send is active. - If
taker_running := true
and/schedule
responds with200
: Scheduler is active.
Edit: But you are right, this feels very brittle.
That's a nice hack. 😉 I think we can get a flag into the /session
endpoint quite easily though. I'm already on it. If that doesn't play out for some reason we can still fall back to what you described I'd say.
Relevant backend PR that would enable us to differentiate between "Schedule" and "Single Collaborative Transaction": https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1307
As https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1307 has been merged, this issue is unblocked and can be worked on.
Tempted to pump this up to 0.1 or at least 0.1.1 - super annoying that you can't stop a running operation yet.
Should be as easy as calling /taker/stop