Skip to content

fix: multiple issues #510, #511, #515, #516#522

Merged
ogazboiz merged 4 commits into
LabsCrypt:mainfrom
pope-h:fix/multiple-issues-510-511-515-516
May 29, 2026
Merged

fix: multiple issues #510, #511, #515, #516#522
ogazboiz merged 4 commits into
LabsCrypt:mainfrom
pope-h:fix/multiple-issues-510-511-515-516

Conversation

@pope-h
Copy link
Copy Markdown
Contributor

@pope-h pope-h commented May 29, 2026

Summary

Fixes four issues in the FlowFi project plus one pre-existing contract bug:

Changes

Frontend

  • Added AbortController signal to fetchStream and fetchEvents with proper cleanup
  • Added URL.revokeObjectURL call after CSV download

Backend

  • Removed unused claimableOutTotal loop computation

Infra

  • Deleted deploy.ts (replace with canonical deploy.sh)

Contract

  • Fixed syntax error in events.rs (stray code fragments)
  • Note: Contract has pre-existing duplicate function definitions (pause_stream, resume_stream defined twice) that need separate fix

Test Plan

  • Frontend stream-detail page loads and refetches correctly
  • AbortController properly cancels in-flight requests on unmount or streamId change
  • CSV export download works and memory is properly released
  • Deploy script tests pass with deploy.sh
  • Backend tests pass
  • Contract compiles after syntax error fix

Known Issues

The contract code has pre-existing duplicate function definitions that should be resolved separately:

  • pause_stream defined twice (lines 322 and 652 in lib.rs)
  • resume_stream defined twice (lines 365 and 687 in lib.rs)

pope-h added 4 commits May 29, 2026 03:18
Pass abort signal to fetchStream and fetchEvents functions. Abort on cleanup
or when streamId changes to prevent "setState on unmounted component" races
and cancel stale in-flight requests. Ignore AbortError in catch blocks.

Closes LabsCrypt#510
Call URL.revokeObjectURL after download is triggered to free memory.
Prevents object URL leaks on repeated CSV exports.

Closes LabsCrypt#511
deploy.ts had incompatible differences with deploy.sh:
- Argument format: --network=testnet vs --network testnet
- Environment variable: STELLAR_SECRET_KEY vs DEPLOYER_SECRET
- Network argument semantics: RPC URL vs network name

The README documents deploy.sh as canonical. Keep deploy.sh as single
source of truth for deployments.

Closes LabsCrypt#515
Remove unused loop that calculates claimableOutTotal in getUserStreamSummary.
The value is never included in the returned summary object, so the computation
is wasted per request.

Closes LabsCrypt#516
@pope-h pope-h force-pushed the fix/multiple-issues-510-511-515-516 branch from 0dfcdfc to 0e3ec77 Compare May 29, 2026 02:18
@ogazboiz ogazboiz merged commit 2e06d7c into LabsCrypt:main May 29, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants