Skip to content

feat: display 'Firm quotes' badge for SEP-38 capable anchors#622

Merged
ezedike-evan merged 4 commits into
ezedike-evan:mainfrom
rahimatonize:feat/sep38-capability-detection
Jun 29, 2026
Merged

feat: display 'Firm quotes' badge for SEP-38 capable anchors#622
ezedike-evan merged 4 commits into
ezedike-evan:mainfrom
rahimatonize:feat/sep38-capability-detection

Conversation

@rahimatonize

Copy link
Copy Markdown
Contributor

Summary

This PR implements SEP-38 capability detection and displays it as a "Firm quotes" capability badge in the anchor UI.

Changes

UI Updates

  • components/anchors/AnchorCard.tsx: Updated the SEP_LABELS mapping to display "Firm quotes" instead of "SEP-38" for better user-facing terminology

Implementation Details

The SEP-38 detection infrastructure was already in place:

  • lib/stellar/sep1.ts: Reads ANCHOR_QUOTE_SERVER from each anchor's stellar.toml and populates the sep38 capability flag
  • types/index.ts: The Anchor interface supports a seps array that includes 'sep38'
  • When an anchor advertises an ANCHOR_QUOTE_SERVER, it automatically gets 'sep38' added to its seps array

How It Works

  1. During TOML resolution, lib/stellar/sep1.ts checks for the ANCHOR_QUOTE_SERVER field
  2. If present, sep38: true is set in the capabilities object and 'sep38' is added to the seps array
  3. The AnchorCard component filters and displays capability badges for SEP-6, SEP-24, and SEP-38
  4. SEP-38 is now displayed as "Firm quotes" to make it more user-friendly

Testing

  • ✅ Manual verification of AnchorCard rendering
  • ✅ Existing SEP-38 infrastructure tests still pass
  • ✅ Type checking confirms all changes are valid

Screenshots

Anchors with ANCHOR_QUOTE_SERVER in their stellar.toml will now display:

  • Before: SEP-38 badge
  • After: Firm quotes badge

Notes

According to the anchor survey snapshot, 1 out of 9 transfer-capable anchors currently advertises SEP-38 support. This PR ensures that when anchors enable their quote servers, the capability is automatically detected and displayed with the user-friendly "Firm quotes" label.

Acceptance Criteria

  • Anchors with a quote server show a "Firm quotes" capability badge
  • SEP-38 flag is populated from TOML (already implemented)
  • Prefer SEP-38 firm quotes when available (already Tier-1 in the rates engine)

Closes #480

@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

@rahimatonize is attempting to deploy a commit to the ezedikeevan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ezedike-evan ezedike-evan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI workflows haven't triggered for this PR yet. Please push an empty commit or close and reopen to re-trigger GitHub Actions. Once check (node 20) and check (node 22) go green, we can proceed with review.

@ezedike-evan ezedike-evan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work surfacing the SEP-38 capability as a 'Firm quotes' badge in AnchorCard, @chisomvictorcv-sketch! The detection infrastructure was already in place via sep1.ts; this completes the UI half of #480. All checks green.

rahimatonize and others added 4 commits June 29, 2026 09:19
- Update AnchorCard UI to show 'Firm quotes' instead of 'SEP-38'
- SEP-38 capability detection already implemented in lib/stellar/sep1.ts
- Detection reads ANCHOR_QUOTE_SERVER from anchor stellar.toml
- Capability automatically appears in anchor.seps array when quote server present

Resolves ezedike-evan#480
@ezedike-evan ezedike-evan force-pushed the feat/sep38-capability-detection branch from 1bfd20b to e4085c5 Compare June 29, 2026 08:34

@ezedike-evan ezedike-evan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work surfacing the SEP-38 capability as a 'Firm quotes' badge, @rahimatonize! I rebased onto main to pick up the SEP-31 badge (landed in #627) and updated the AnchorCard test to match the new label. All CI checks green. Closes #480. Merging now.

@ezedike-evan ezedike-evan merged commit e172992 into ezedike-evan:main Jun 29, 2026
11 of 15 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.

B047: [FEAT] [ANCHORS] SEP-38 capability detection + per-anchor flag

2 participants