Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Why this matters
stream.controller.ts:641-650 (pause) and :740-752 (resume) write a StreamEvent with transactionHash = result.txHash, which sorobanService returns as the fabricated simulated-pause- / simulated-resume- and ledgerSequence:0. When the genuine on-chain event is later indexed, the worker inserts a SECOND StreamEvent keyed on the real txHash. Because @@unique is (transactionHash, eventType) and the two txHashes differ, both rows survive -> duplicate PAUSED/RESUMED entries with a bogus ledgerSequence 0.
Acceptance criteria
Files to touch
backend/src/controllers/stream.controller.ts
backend/src/services/sorobanService.ts
backend/src/workers/soroban-event-worker.ts
Out of scope
- Real frontend-signed transaction submission flow
Why this matters
stream.controller.ts:641-650 (pause) and :740-752 (resume) write a StreamEvent with transactionHash = result.txHash, which sorobanService returns as the fabricated simulated-pause- / simulated-resume- and ledgerSequence:0. When the genuine on-chain event is later indexed, the worker inserts a SECOND StreamEvent keyed on the real txHash. Because @@unique is (transactionHash, eventType) and the two txHashes differ, both rows survive -> duplicate PAUSED/RESUMED entries with a bogus ledgerSequence 0.
Acceptance criteria
Files to touch
backend/src/controllers/stream.controller.tsbackend/src/services/sorobanService.tsbackend/src/workers/soroban-event-worker.tsOut of scope