Feature/implement rate page#632
Merged
Merged
Conversation
- Add src/pages/rate.tsx with live XLM/BTC/ETH/USDC rate cards - Add src/lib/api/rateAPI.ts using CoinGecko + Stellar Horizon APIs - Add src/components/Rate/RateHistoryChart.tsx (Recharts AreaChart) - Add currency conversion calculator (XLM, BTC, ETH, USDC, USD) - Add Stellar network fee stats panel - Add rate source attribution footer - Add 'trending-up' icon to NavIcon.tsx - Add 'Exchange Rates' nav item to navConfig.ts sidebar - Auto-refresh every 60 seconds with manual refresh button - Full loading skeletons, error banner, and responsive layout
- Add useExchangeRates hook for fetching and managing exchange rate data - Implement Rate page with real-time XLM and token exchange rates - Add 24-hour historical rate chart using Recharts - Implement currency conversion calculator with swap functionality - Add rate refresh mechanism (auto-refresh every 5 minutes) - Include loading and error states for better UX - Add rate source attribution and disclaimer - Responsive design for mobile and desktop - Support for multiple cryptocurrencies (XLM, USDC, BTC, ETH) Acceptance criteria met: ✓ Rates are accurate and up to date ✓ Refresh works correctly ✓ Chart renders properly ✓ Conversion calculator is accurate ✓ Responsive layout implemented
feat: implement Exchange Rate page
- Remove legacy mock-based rates.tsx and useExchangeRates.ts - Create ratingAPI.ts REST API service for review CRUD + verification - Create useRating.ts hook wrapping ratingAPI with state management - Create review.tsx page at /review with star rating, review form, rating stats, blockchain verification, and responsive layout - Add 'Rate Us' entry to sidebar navigation
- Add .githooks/pre-push hook that rejects pushes with no shared history with the remote (prevents 'different histories' PR error) - Add AGENTS.md documenting the git workflow for IDE/agent
- Add pre-commit hook that blocks commits not authored by FairBid - Update pre-push hook to verify all pushed commits match expected author - Document authorship requirements in AGENTS.md
|
@fairbid01 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! 🚀 |
Contributor
Author
|
@llinsss check and merge PR, thanks! |
llinsss
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reimplements the Rate page from wata-board-frontend — an app rating/review system that lets users rate their PetChain experience and store reviews on the Stellar blockchain. Also removes the legacy mock-based exchange rates page and adds git hooks to enforce proper commit authorship and prevent orphan-branch pushes.
Changes
🗑️ Removed
src/pages/rates.tsx — legacy mock-based exchange rates page (superseded by rate.tsx)
src/hooks/useExchangeRates.ts — mock data hook (only used by above)
✨ Added
src/pages/review.tsx — full rating UI at /review:
Star rating (1–5) with hover/select states and labels
Review text area (500 char limit)
Submit to blockchain with loading spinner
Transaction hash display + "Verify on Blockchain" button
Rating stats card (average score, total reviews)
Rating distribution bar chart (5-star breakdown)
Existing review display (if already submitted)
Wallet connection gate
Loading skeletons, error banners, success states
Blockchain transparency info section
Auth guard + responsive Tailwind glassmorphism design
src/lib/api/ratingAPI.ts — REST API service for rating CRUD + verification
src/hooks/useRating.ts — hook wrapping ratingAPI with state management
🔧 Modified
src/components/Navigation/navConfig.ts — added "Rate Us" sidebar entry at /review
🛡️ Git Workflow Enforcement
.githooks/pre-commit — blocks commits not authored by FairBid fairbid01@gmail.com
.githooks/pre-push — blocks pushes with orphan branches or wrong authorship
AGENTS.md — documents the full git workflow for IDE/agent integration
Acceptance Criteria
Star rating UI works with hover/select
Review submission with loading/error/success states
Rating stats and distribution display
Blockchain verification button
Existing review detection for returning users
Wallet connect gate
Responsive layout and Tailwind styling
Auth-guarded
Git hooks prevent orphan pushes and wrong authorship
Closes #375