Skip to content

Register the Swapter swap provider - #6164

Open
j0ntz wants to merge 1 commit into
developfrom
jon/swapter-gui-registration
Open

Register the Swapter swap provider#6164
j0ntz wants to merge 1 commit into
developfrom
jon/swapter-gui-registration

Conversation

@j0ntz

@j0ntz j0ntz commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

Requires edge-exchange-plugins@2.53.0, which is published. The dep bump onto
develop lands separately as part of that package's release.

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

No visual changes. The only user-visible surface is the provider icon on a
Swapter transaction row, which is a data entry pointing at an existing content
server asset, not a layout or component change.

Description

Asana task

Asana: https://app.asana.com/1/9976422036640/project/1213880789473005/task/1216571782597915

Registers Swapter in the app so the plugin that
EdgeApp/edge-exchange-plugins#475
added actually loads. The changes are data entries, with no logic:

  • src/envConfig.ts gains SWAPTER_INIT, matching the SWAPUZ_INIT / XGRAM_INIT
    shape (apiKey, optional, .withRest).
  • src/util/corePlugins.ts gains swapter: ENV.SWAPTER_INIT in the CEX swap block.
  • src/actions/CategoriesActions.ts gains the pluginIdIcons entry so a Swapter
    transaction row renders the provider icon.

The first two are exactly the edits used locally to exercise Swapter on the
simulator during the plugin's review rounds, carried over unchanged.

The provider stays dark until the info server serves it

asCorePluginInit resolves to false when its key is absent from env.json, so
registering the plugin does not enable it. Swapter cannot appear in the app until
the info server serves SWAPTER_INIT, which is a separate operational step.
Landing this PR is therefore not the moment Swapter goes live for users.

Icon path

The icon uses exchangeIcons/swapter/icon.png rather than the flat swapter.png
that most entries in that map use. That is not a style choice: the flat path
answers 403 on the content server and the exchangeIcons one answers 200, which
is the same convention nexchange and nymswap already use.

Deliberately not included

  • No MERCHANT_CONTACTS entry. That map keys off display name and expects a
    flat swapter.png, which does not exist on the content server. pluginIdIcons
    already covers the icon by plugin ID, and nymswap and nexchange ship with no
    merchant-contact entry either.
  • No SwapVerifyTermsModal entry. Adding one introduces a mandatory
    terms-acceptance modal before a user's first Swapter swap, which is a product
    decision rather than part of registering the plugin. Roughly half the CEX
    providers have an entry and half do not. Swapter's pages are live
    (https://swapter.io/terms-of-use, https://swapter.io/privacy-policy) if this
    is wanted.

Testing

verify-repo.sh --base origin/develop passes: CHANGELOG, npm run prepare,
eslint over the 3 changed files, and the full jest suite, which ran 553 tests
across 81 suites and matched all 103 snapshots.

No simulator run for this branch, by design. These are the same edits already
exercised on the simulator during the plugin's own review rounds, where a max
DOGE to LTC swap ran through Swapter to the success scene with this exact
registration in place. That evidence and its screenshots live on
edge-exchange-plugins#475.


Note

Low Risk
Data-only registration mirroring existing CEX providers; the plugin remains disabled until the info server serves SWAPTER_INIT.

Overview
Registers Swapter in the app so the edge-exchange-plugins Swapter plugin can load when the info server provides init options. The diff is configuration only—no swap or UI logic changes.

SWAPTER_INIT is added in envConfig.ts with the same shape as SWAPUZ_INIT / XGRAM_INIT (optional apiKey, .withRest). corePlugins.ts maps swapter: ENV.SWAPTER_INIT in the centralized swap block. pluginIdIcons in CategoriesActions.ts points at exchangeIcons/swapter/icon.png so Swapter rows in transaction history show the provider icon.

Swapter does not turn on from this PR alone: asCorePluginInit resolves to false when SWAPTER_INIT is absent from env.json, so users only see Swapter after the info server serves that key.

Reviewed by Cursor Bugbot for commit 73373cc. Bugbot is set up for automated code reviews on this repo. Configure here.

Adds the SWAPTER_INIT env cleaner and the corePlugins entry, which is
all the app needs to load the plugin that edge-exchange-plugins now
ships. These are the same two edits used locally to exercise Swapter
on the simulator, with nothing else from that scratch state.

The provider stays dark until the info server serves SWAPTER_INIT:
asCorePluginInit resolves to false when the key is absent, so the
plugin is registered but never constructed.
@j0ntz
j0ntz force-pushed the jon/swapter-gui-registration branch from b999857 to 73373cc Compare August 18, 2026 21:09
@j0ntz
j0ntz marked this pull request as ready for review August 18, 2026 21:09

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

2 participants