Skip to content

Enable NYM swap provider#6023

Merged
j0ntz merged 1 commit into
developfrom
jon/nym-swap
Jul 11, 2026
Merged

Enable NYM swap provider#6023
j0ntz merged 1 commit into
developfrom
jon/nym-swap

Conversation

@j0ntz

@j0ntz j0ntz commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

EdgeApp/edge-exchange-plugins#457

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)

Description

Enable the NYM swap provider (added in edge-exchange-plugins#457).

  • src/util/corePlugins.ts: register nymswap: ENV.NYM_SWAP_INIT in swapPlugins. The swap plugin id is nymswap, intentionally distinct from the nym currency plugin id (edge-core-js keys all plugins in one namespace; reusing nym silently drops the swap plugin).
  • src/envConfig.ts: add NYM_SWAP_INIT ({ apiKey }, sent as the x-api-key header).

Configure the key in env.json:

"NYM_SWAP_INIT": { "apiKey": "<key>" }

NYM swaps run on NYM's livenet (production) backend; the endpoints live in edge-exchange-plugins#457. GUI wiring is endpoint-agnostic, so this PR is unchanged by the testnet → livenet migration.

Verified end-to-end in the iOS simulator: ran a real mainnet swap My Ether 4 (USDT on Ethereum) → My Nym (native NYM on Nyx). The quote resolved "Powered by NYM" (6.006 USDT → 326.99 NYM) and slide-to-confirm broadcast the on-chain payin (max network fee 0.0002709 ETH), with the order entering processing ("Congratulations! Your exchange is being processed", tx category Exchange: To NYM).


Note

Low Risk
Standard swap-plugin registration and optional API key config only; no changes to auth, payments, or wallet key handling.

Overview
Enables the NYM centralized swap provider in the app by wiring the existing nymswap exchange plugin into core plugin registration and environment config.

src/util/corePlugins.ts adds nymswap: ENV.NYM_SWAP_INIT alongside other CEX swap plugins. The id is nymswap, separate from the nym wallet/currency plugin, so both can load in the shared plugin namespace.

src/envConfig.ts introduces NYM_SWAP_INIT with an optional apiKey (for the x-api-key header on NYM’s API). Operators enable it via env.json, e.g. "NYM_SWAP_INIT": { "apiKey": "<key>" }.

CHANGELOG notes the new provider. Swap routing/quote UI behavior follows the same pattern as other env-gated swap plugins; the NYM backend lives in edge-exchange-plugins.

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

@j0ntz

j0ntz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence — real NYM swap (Sepolia ETH → NYM) executed on iOS sim

agent proof 1215306512581867 01 pair sepolia to nym

agent proof 1215306512581867 01 pair sepolia to nym

agent proof 1215306512581867 02 nym quote powered by

agent proof 1215306512581867 02 nym quote powered by

agent proof 1215306512581867 03 swap success

agent proof 1215306512581867 03 swap success

agent proof 1215306512581867 04 tx details to nym

agent proof 1215306512581867 04 tx details to nym

Captured by the agent's in-app test run (build-and-test).

@j0ntz

j0ntz commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence: livenet USDT to NYM swap on iOS sim

livenet quote powered by nym

livenet quote powered by nym

swap success scene

swap success scene

tx details to nym

tx details to nym

Captured by the agent's in-app test run (build-and-test).

Register the nymswap plugin (from edge-exchange-plugins) and add its
NYM_SWAP_INIT core-plugin init ({ apiKey }, header x-api-key). The swap
plugin id is nymswap, distinct from the nym currency plugin id.

Configure the api key via env.json:
  "NYM_SWAP_INIT": { "apiKey": "<key>" }

Depends on EdgeApp/edge-exchange-plugins#457.
@j0ntz j0ntz enabled auto-merge July 11, 2026 01:36
@j0ntz j0ntz merged commit e83ffad into develop Jul 11, 2026
7 checks passed
@j0ntz j0ntz deleted the jon/nym-swap branch July 11, 2026 02:18
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