Repository navigation
fix: stream cancel visibility, wizard tx hash & post-submit stream matching - #1626
Merged
K1NGD4VID merged 1 commit intoOct 18, 2026
Merged
Conversation
…ssues - LabsCrypt#1219: write a provisional CANCELLED StreamEvent atomically with the API cancel status update so cancelled streams immediately appear under the 'cancelled' status filter; the indexer reconciles the provisional event with authoritative ledger data instead of dropping it. - LabsCrypt#1204: wizard post-submit polling now matches the newly created stream by recipient, deposit amount and most-recent createdAt instead of blindly taking streams[0]. - LabsCrypt#1205: cover /streams/create client-side recipient validation with an integration test asserting an inline error and no createStream call. - LabsCrypt#1203: verify the wizard surfaces the real transaction hash (already typed/returned correctly, with regression tests). Closes LabsCrypt#1219 Closes LabsCrypt#1204 Closes LabsCrypt#1205 Closes LabsCrypt#1203
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.
Summary
Resolves four issues from the second-wave repository audit.
#1219 — Cancelled-via-API stream becomes invisible to status filters
backend/src/repositories/stream.repository.ts: newmarkCancelledProvisionally(streamId, txHash)writes theisActive=falseupdate and a provisionalCANCELLEDStreamEventin a singleprisma..backend/src/controllers/stream/cancel.tsnow calls this helper instead of the event-lessupdateStatus.backend/src/workers/soroban-event-worker.ts:handleStreamCancellednow reconciles the provisional event (updates ledger/timestamp/amount/metadata) instead of skipping it, so API-cancelled and indexer-cancelled paths dedupe naturally on the shared(transactionHash, eventType)key.backend/tests/integration/cancel-status-filter.test.tsasserts the stream appears understatus=cancelled(and disappears fromstatus=active) immediately after the API cancel, plus reconciliation on the indexed event.#1204 — Wizard's post-submit lookup can resolve to the wrong stream
StreamCreationWizard.startPollingnow filters polled streams by the submitted recipient + deposit amount, then picks the most recentcreatedAtmatch — instead of blindly takingstreams[0].#1205 — No client-side Stellar address validation on
/streams/createvalidateAll()(validateStreamForm→validateRecipient→isValidStellarPublicKey) and shows an inline field error.createStream, while a valid address does.#1203 — Stream creation wizard never receives a real transaction hash
main(prop typedPromise<{ txHash: string }>,handleCreateStreamreturns the realSorobanResult, unsafe cast removed, txHash regression tests present). Verified and left as-is.Testing
npx tsc --noEmitclean; full suite847 passed / 3 skipped(one unrelated timing-flakystream-actionsclaimable test passes in isolation).npx tsc --noEmitclean; ESLint clean on changed files; full suite663 passed.Closes #1219
Closes #1204
Closes #1205
Closes #1203