Skip to content

feat: Trade Expiry Auto-Release UI (Issue #123)#4

Open
FaithOnuh wants to merge 1 commit into
mainfrom
feature/issue-123-trade-expiry-auto-release-ui
Open

feat: Trade Expiry Auto-Release UI (Issue #123)#4
FaithOnuh wants to merge 1 commit into
mainfrom
feature/issue-123-trade-expiry-auto-release-ui

Conversation

@FaithOnuh
Copy link
Copy Markdown
Owner

@FaithOnuh FaithOnuh commented Mar 30, 2026

Summary of Changes

  • New frontend/tradeExpiry.js: reusable module with startCountdown, showReleaseButton, and init; dispatches trade:auto_released custom event on success
  • client/src/lib/contract.ts: added executeAutoRelease(tradeId, callerKeypair) calling the contract's claim_time_release function
  • client/src/routes/trades/[id]/+page.svelte:
    • Live HH:MM:SS countdown timer with aria-live for accessibility
    • "Release Funds" button appears only when isExpired && tradeStatus === 'Funded'
    • Calls executeAutoRelease, shows tx hash on success, error message on failure
    • Interval cleaned up on component destroy via onDestroy

Closes Stellar-xcrow#410

…w#123)

- frontend/tradeExpiry.js: reusable countdown timer + showReleaseButton
  helper; dispatches trade:auto_released custom event on success
- contract.ts: add executeAutoRelease() calling claim_time_release
- trades/[id]/+page.svelte:
  - live countdown timer (HH:MM:SS) with aria-live for accessibility
  - Release Funds button appears only when isExpired && status === Funded
  - calls executeAutoRelease, shows tx hash on success, error on failure
  - cleans up interval on component destroy

Closes Stellar-xcrow#123
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.

Issue #123: Trade Expiry Auto-Release UI

1 participant