feat: display 'Firm quotes' badge for SEP-38 capable anchors#622
Conversation
|
@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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
- 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
1bfd20b to
e4085c5
Compare
ezedike-evan
left a comment
There was a problem hiding this comment.
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.
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 theSEP_LABELSmapping to display "Firm quotes" instead of "SEP-38" for better user-facing terminologyImplementation Details
The SEP-38 detection infrastructure was already in place:
lib/stellar/sep1.ts: ReadsANCHOR_QUOTE_SERVERfrom each anchor'sstellar.tomland populates thesep38capability flagtypes/index.ts: TheAnchorinterface supports asepsarray that includes'sep38'ANCHOR_QUOTE_SERVER, it automatically gets'sep38'added to itssepsarrayHow It Works
lib/stellar/sep1.tschecks for theANCHOR_QUOTE_SERVERfieldsep38: trueis set in the capabilities object and'sep38'is added to the seps arrayAnchorCardcomponent filters and displays capability badges for SEP-6, SEP-24, and SEP-38Testing
Screenshots
Anchors with
ANCHOR_QUOTE_SERVERin their stellar.toml will now display:SEP-38badgeFirm quotesbadgeNotes
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
Closes #480