Summary
TierWarning.tsx shows only a numeric score and a static per-tier message (src/lib/tiers.ts:10-47) -- there's no 'why' (e.g. destination created 2 minutes ago, linked to N reported scam addresses). Once real scoring lands, the underlying oracle will very likely carry reason data that's currently unused.
Current Behavior / Relevant Code
- src/lib/tiers.ts:3-8 (TierInfo has no field for dynamic reasons).
- src/popup/TierWarning.tsx:1-38.
- src/adapter/oracleAdapter.ts:6 (getScore returns a bare number, no structured explanation).
Why This Matters
A numeric score with no explanation is far less actionable and far less trust-building for a user deciding whether to cancel a real financial transaction than a score paired with concrete reasons.
Proposed Solution
- Extend getScore's contract to something like getScoreDetails(destination): Promise<{ score: number; reasons?: string[] }>, threading the richer shape through resolveOutcome, the runtime messages, and into TierWarning.
- Render reasons as a list under the tier message, gracefully hiding the section when no reasons are available (e.g. still on the stub).
- Update all touched tests (tiers.test.ts, resolveOutcome.test.ts, App.test.tsx).
Acceptance Criteria
Definition of Done
How to Claim This Issue (Application Process)
- Comment first. Post a short implementation plan on this issue — your proposed approach, the files you expect to touch, and any open questions — before writing code. This prevents duplicate effort and lets a maintainer flag concerns early, which matters especially for an issue at this complexity level.
- Wait for assignment. A maintainer will review your plan and assign the issue to you, typically within 48 hours. Please do not open a draft PR before you're assigned.
- Stay active. If there's no visible activity (commits or comments) for 10 days after assignment, the issue may be unassigned and reopened to other contributors.
- Submit a scoped PR. Reference this issue (
Closes #<issue-number>), keep the diff scoped to the acceptance criteria above, and ensure all CI gates pass before requesting review.
- Engage with review. Respond to review feedback within a reasonable timeframe; PRs with no response after 7 days may be closed pending resubmission when you're ready to pick it back up.
Category: Oracle Adapter & Scoring
Estimated effort: M (medium, ~3-5 days)
Difficulty: Advanced — this issue assumes familiarity with the codebase's MV3 service-worker architecture, the Freighter interception protocol, and/or the Stellar SDK.
Summary
TierWarning.tsx shows only a numeric score and a static per-tier message (src/lib/tiers.ts:10-47) -- there's no 'why' (e.g. destination created 2 minutes ago, linked to N reported scam addresses). Once real scoring lands, the underlying oracle will very likely carry reason data that's currently unused.
Current Behavior / Relevant Code
Why This Matters
A numeric score with no explanation is far less actionable and far less trust-building for a user deciding whether to cancel a real financial transaction than a score paired with concrete reasons.
Proposed Solution
Acceptance Criteria
Definition of Done
npm run lint,npm run typecheck,npm test, andnpm run buildall pass locally and in CIREADME.mdHow to Claim This Issue (Application Process)
Closes #<issue-number>), keep the diff scoped to the acceptance criteria above, and ensure all CI gates pass before requesting review.Category: Oracle Adapter & Scoring
Estimated effort: M (medium, ~3-5 days)
Difficulty: Advanced — this issue assumes familiarity with the codebase's MV3 service-worker architecture, the Freighter interception protocol, and/or the Stellar SDK.