https://t.me/+DOylgFv1jyJlNzM0
Description
The smart contract has a cancel_stream function but no POST /streams/:streamId/cancel route exists in the backend v1 routes. Without this endpoint the frontend cancel UI and any external tooling cannot trigger on-chain cancellation. This issue tracks creating the endpoint, calling sorobanService.cancelStream(), and syncing the DB record to CANCELLED status on success.
Acceptance Criteria
Files to Touch
app/api/routes/v1/streams/ — add cancel.ts route handler
app/services/soroban.service.ts — expose cancelStream method if not present
app/api/routes/v1/streams/index.ts — register the new route
app/repositories/stream.repository.ts — updateStatus helper
tests/integration/streams/cancel.test.ts — new test file
https://t.me/+DOylgFv1jyJlNzM0
Description
The smart contract has a
cancel_streamfunction but noPOST /streams/:streamId/cancelroute exists in the backend v1 routes. Without this endpoint the frontend cancel UI and any external tooling cannot trigger on-chain cancellation. This issue tracks creating the endpoint, callingsorobanService.cancelStream(), and syncing the DB record toCANCELLEDstatus on success.Acceptance Criteria
POST /api/v1/streams/:streamId/cancelroute exists and is registeredsorobanService.cancelStream(streamId, callerAddress)is invoked;txHashreturned in responseCANCELLEDon successful transaction404if stream not found,403if caller is not the sender,409if stream already cancelled/completedFiles to Touch
app/api/routes/v1/streams/— addcancel.tsroute handlerapp/services/soroban.service.ts— exposecancelStreammethod if not presentapp/api/routes/v1/streams/index.ts— register the new routeapp/repositories/stream.repository.ts—updateStatushelpertests/integration/streams/cancel.test.ts— new test file