feat: wire withdraw endpoint to soroban contract and refactor routing#446
Open
sweetesty wants to merge 1 commit intoLabsCrypt:mainfrom
Open
feat: wire withdraw endpoint to soroban contract and refactor routing#446sweetesty wants to merge 1 commit intoLabsCrypt:mainfrom
sweetesty wants to merge 1 commit intoLabsCrypt:mainfrom
Conversation
Contributor
|
hey, main was failing CI from broken auth imports + frontend parse errors. fixed and pushed to main now. please rebase to pick up the fixes: git fetch upstream
git rebase upstream/main
git push --force-with-leaseif there's a conflict, resolve it locally and we'll review once CI is green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Pull Request
🔗 Related Issue
Closes #412
📝 Description
POST /api/v1/streams/:streamId/withdrawendpoint and wires it tosorobanService.withdraw()so frontend and external integrators can trigger withdrawals through the APIwithdrawfunction with no corresponding HTTP endpoint, leaving callers with no way to trigger withdrawals via the API🚀 Changes Made
Route —
app/api/routes/v1/streams/withdraw.ts:POST /api/v1/streams/:streamId/withdrawroute handlersorobanService.withdraw(streamId, callerAddress)and returnstxHashin response body404if stream not found403if caller is not the recipient400on contract revert with error messageService —
app/services/soroban.service.ts:withdraw(streamId, callerAddress)method wired to the Soroban contractRouter —
app/api/routes/v1/streams/index.ts:Testing —
tests/integration/streams/withdraw.test.ts:Validation
npm run lint— passedScreenshots (if UI changes)
N/A
Checklist