Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf884448e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the review’s only actionable item (reverse-quote limit handling) and resolved the inline thread. |
peachbits
left a comment
There was a problem hiding this comment.
Approved, assuming the small ask from bugbot regarding the result flag is addressed
|
Addressed the bugbot follow-up by only falling back to the requested destination amount for reverse quotes, requiring ccyAmountToExpected for forward quotes, and revalidating the Xgram response shapes with live curl requests. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Description
Context
Asana: "exch: Swap - Xgram Support" (P1). This branch reapplies the plugin work from #405 so the exchange engine can serve the Xgram team with the new swap flow and mappings.
Changes
Original PR
xgramplugin insrc/index.ts, include its synchronizer inscripts/allSynchronizers.ts, and add the mapping source plus generated file so EdgeCurrencyPluginIds map to Xgram network codes.src/swap/central/xgram.tsto compose the Xgram API calls, assemble swap estimates, handle memos/mapping metadata, and feed the swap engine usableEdgeSpendInfo.Additional changes
ccyAmountlimit strings, producing the correctSwapBelowLimitError/SwapAboveLimitError, and recognizing literalerrorresponses via the newasXgramStringError.CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
None
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Medium Risk
Adds a new external swap provider with new API integration and error/limit handling, which could affect quoting and spend construction if mappings or response parsing are wrong.
Overview
Adds Xgram as a new centralized swap provider, including a new
xgramswap plugin wired intosrc/index.tsand a corresponding mapctl synchronizer registered inscripts/allSynchronizers.ts.Introduces hand-maintained currency/network mappings (
scripts/mappings/xgramMappings.ts) with a generated runtime mapping (src/mappings/xgram.ts), plus a newXGRAM_API_KEYconfig entry. The Xgram plugin implements quote/order creation against Xgram’s API, buildsEdgeSpendInfo(including memo/tag handling), and improves error translation for region restrictions, unsupported currencies, and min/max limits (including parsing stringccyAmountlimit errors).Written by Cursor Bugbot for commit fca8baa. This will update automatically on new commits. Configure here.