Problem
The VouchImpactPreview component (lines 6, 21-23) uses hardcoded values:
VOUCH_REPUTATION_BOOST = 12 (line 6)
currentRate = 8 (8%) and newRate = 6 (6%) (line 21)
These should be calculated from the learner's actual reputation score and the mentor's tier. The hardcoded values mislead mentors about the actual impact of their vouch.
Root Cause
Preview values were hardcoded during initial component development. The API provides real reputation data via GET /reputation/:wallet but it's not used here.
What To Build
- Fetch learner reputation via
reputationService.getReputation(learnerWallet)
- Calculate vouch impact: boost = mentor_tier_multiplier (not always 12)
- Calculate new interest rate based on boosted score (not always 6%)
- Add loading state while reputation data fetches
- Add error state if data unavailable
Files To Touch
src/components/vouch/VouchImpactPreview.tsx — replace hardcoded values
Acceptance Criteria
Mandatory Checks
Problem
The
VouchImpactPreviewcomponent (lines 6, 21-23) uses hardcoded values:VOUCH_REPUTATION_BOOST = 12(line 6)currentRate = 8(8%) andnewRate = 6(6%) (line 21)These should be calculated from the learner's actual reputation score and the mentor's tier. The hardcoded values mislead mentors about the actual impact of their vouch.
Root Cause
Preview values were hardcoded during initial component development. The API provides real reputation data via
GET /reputation/:walletbut it's not used here.What To Build
reputationService.getReputation(learnerWallet)Files To Touch
src/components/vouch/VouchImpactPreview.tsx— replace hardcoded valuesAcceptance Criteria
Mandatory Checks