Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.