Wire swaps.xyz swap provider - #6128
Conversation
Add SWAPSXYZ_INIT core plugin init (envConfig) and register the swapsxyz swap plugin in corePlugins so the app initializes the new edge-exchange-plugins swaps.xyz provider from env.json SWAPSXYZ_INIT.apiKey. Requires a published edge-exchange-plugins containing the swapsxyz plugin plus a dependency bump before it is functional.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
peachbits
left a comment
There was a problem hiding this comment.
Missing CategoriesActions and MerchantContacts entries. May also be missing the SwapVerifyTerms entry, if applicable
Registering a swap pluginId needs four or five separate entries in this repo, and every one of them fails silently when missed: a missing pluginIdIcons or MERCHANT_CONTACTS row renders a blank icon rather than erroring. The swaps.xyz wiring shipped without two of them and the omission only surfaced in review. List the touch points by path, note that MERCHANT_CONTACTS matches on the plugin's swapInfo.displayName string, and record that SwapVerifyTerms applies to centralized providers only.
|
Added both missing entries in a fixup on
No The icon itself still 403s on content.edge.app for both Also added a |


CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
Depends on EdgeApp/edge-exchange-plugins#480 (the swaps.xyz plugin). This PR is open for review now: it compiles and passes CI standalone. It should only MERGE after #480 merges, edge-exchange-plugins publishes a version containing the
swapsxyzplugin, and this branch bumpsedge-exchange-pluginsto it. Without that bump the registration resolves to no plugin at runtime.Requirements
No visual changes (env/config wiring only).
Description
Wire the new swaps.xyz swap provider so the app initializes it:
src/envConfig.ts— addSWAPSXYZ_INITcore plugin init (apiKey).src/util/corePlugins.ts— registerswapsxyz: ENV.SWAPSXYZ_INITinswapPlugins.src/actions/CategoriesActions.ts—pluginIdIconsentry so swap transactions carry the provider icon.src/constants/MerchantContacts.ts—MERCHANT_CONTACTSentry keyed on the plugin'sswapInfo.displayName(swaps.xyz) for the transaction-list thumbnail.AGENTS.md(separate commit) — aSwap Provider Integrationsection listing every wiring point a new swappluginIdneeds, since each one fails silently when missed.No
SwapVerifyTermsModalentry: swapsxyz isisDex: true, and that modal covers centralized providers with terms/KYC to accept. The icon asset still needs uploading to content.edge.app at/exchangeIcons/swapsxyz/icon.png.The runtime key is supplied via
env.jsonSWAPSXYZ_INIT.apiKey. With a published edge-exchange-plugins containing the plugin, the app then offers swaps.xyz quotes.Verified in-app on the iOS sim (with the plugin linked via updot and the key in env.json): a real Base ETH → USDC swap executed through swaps.xyz to the success scene. Evidence is attached to the plugin PR EdgeApp/edge-exchange-plugins#480.
Asana: https://app.asana.com/0/1215088146871429/1217036054017879
Note
Low Risk
Standard env and registration wiring with no auth or payment logic changes; swap behavior depends on the external plugin package version.
Overview
Registers the swaps.xyz centralized swap provider (
swapsxyz) using the same wiring pattern as providers like Swapuz and n.exchange.Runtime init:
SWAPSXYZ_INITinenvConfig(optionalapiKeyfromenv.json) andswapsxyz: ENV.SWAPSXYZ_INITinswapPluginsso the core can load the plugin fromedge-exchange-plugins.UI: Swap provider icon in
pluginIdIconsand aMERCHANT_CONTACTSrow withdisplayNameswaps.xyzso transaction history shows the correct thumbnail.Docs:
AGENTS.mdnow documents the full swap-provider checklist (env,corePlugins, icons, merchant contacts, terms modal when needed).Quotes only appear after
edge-exchange-pluginsis bumped to a release that includes theswapsxyzplugin; this PR does not bump that dependency.Reviewed by Cursor Bugbot for commit a737b38. Bugbot is set up for automated code reviews on this repo. Configure here.