Skip to content

feat: live exchange rate display in payment form (#262) - #409

Merged
Mystery-CLI merged 2 commits into
Ethereal-Future:mainfrom
manuelusman73-png:feat/issue-262-live-exchange-rate
Apr 25, 2026
Merged

feat: live exchange rate display in payment form (#262)#409
Mystery-CLI merged 2 commits into
Ethereal-Future:mainfrom
manuelusman73-png:feat/issue-262-live-exchange-rate

Conversation

@manuelusman73-png

@manuelusman73-png manuelusman73-png commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Wires the /api/stellar/exchange-rate/XLM/USD endpoint and rateChange WebSocket events into the payment form to show a live USD estimate as the user types an XLM amount.

Changes

  • useExchangeRate: returns { rate, loading } instead of just rate; tracks fetch state so the UI can show a loading indicator
  • App.jsx: shows ≈ $X.XX USD · live rate below the amount input when rate is available; shows Loading rate… while the initial fetch is in flight
  • index.css: adds .rate-estimate--loading style for the loading state

Behaviour

  1. User types an XLM amount → estimated USD value appears immediately (using cached rate)
  2. While rate is still loading → Loading rate… shown instead
  3. When a rateChange WebSocket event arrives → display updates automatically

Closes #262

- useExchangeRate now returns { rate, loading } and tracks fetch state
- Show 'Loading rate…' while initial fetch is in flight
- Update on rateChange WebSocket events from the rates channel
@drips-wave

drips-wave Bot commented Apr 24, 2026

Copy link
Copy Markdown

@manuelusman73-png Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Mystery-CLI
Mystery-CLI merged commit b248e18 into Ethereal-Future:main Apr 25, 2026
15 of 29 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.

Add real-time exchange rate display in the payment form

2 participants