RoboSats / robosats

A simple and private bitcoin exchange
https://learn.robosats.com
GNU Affero General Public License v3.0
707 stars 141 forks source link

add new param current_status to /api/order cancel #1325

Closed jerryfletcher21 closed 3 months ago

jerryfletcher21 commented 3 months ago

What does this PR do?

This PR introduces a new optional parameter current_status that can be used when cancelling an order. The server checks if current_status is the correct status of the order and returns an error without cancelling the order if it is not. This way a client can be sure to cancel an order just if the status is the one it specified. Fixes backed and tests of #1311.

Checklist before merging

jerryfletcher21 commented 3 months ago

This PR is solid and complete. We will be merging #1326 instead given that it implements the frontend fixes and has integration tests as well. But a few things from this PR can be implemented there for the best of both worlds 😄

Makes sense to split the reward as discussed on #1326. Please post an invoice for 40K Sats (+ week expiration if possible) 🚀

Closing.

Sure, perfectly fine with me, I left some comments in #1326

Reckless-Satoshi commented 3 months ago

40K Sats (+ week expiration if possible) 🚀

Feel free to post the invoice in this threat or in the issue. Thank you!