The balance counter on stream detail pages is a lie. useStreamBalance does ratePerSecond * elapsed - withdrawn entirely in the browser. It doesn't read from the chain at all. If the stream gets cancelled or parameters change, the displayed balance drifts from reality.
Replace that with actual stream.balance_of(stream_id) calls. Keep the client-side math as a fast fallback while the RPC call is in flight so the counter doesn't freeze, but show some indicator that it's syncing from chain.
Also, the backend already indexes all the Soroban events (StreamCreated, Withdrawn, Cancelled, VestingCreated, VestingClaimed, VestingRevoked) but nothing in the UI shows them. Build an activity feed on the dashboard — each event with type, amount, counterparty, timestamp, and a link to the Stellar explorer. Should have filters by event type and pagination for older stuff.
Done when:
- Stream detail shows on-chain balance, not just client-side math
- Balance updates within a few seconds of on-chain change
- Dashboard has an activity feed for the connected wallet
- Events link to Stellar explorer
- Can filter by event type
- Pagination for older events
The balance counter on stream detail pages is a lie.
useStreamBalancedoesratePerSecond * elapsed - withdrawnentirely in the browser. It doesn't read from the chain at all. If the stream gets cancelled or parameters change, the displayed balance drifts from reality.Replace that with actual
stream.balance_of(stream_id)calls. Keep the client-side math as a fast fallback while the RPC call is in flight so the counter doesn't freeze, but show some indicator that it's syncing from chain.Also, the backend already indexes all the Soroban events (StreamCreated, Withdrawn, Cancelled, VestingCreated, VestingClaimed, VestingRevoked) but nothing in the UI shows them. Build an activity feed on the dashboard — each event with type, amount, counterparty, timestamp, and a link to the Stellar explorer. Should have filters by event type and pagination for older stuff.
Done when: