Skip to content

Enable NYM swap provider#6023

Open
j0ntz wants to merge 2 commits into
developfrom
jon/nym-swap
Open

Enable NYM swap provider#6023
j0ntz wants to merge 2 commits 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 is testnet-only for now.

Verified end-to-end in the iOS simulator: created Sepolia ETH + NYM wallets, funded Sepolia from a faucet, and ran a real swap My Sepolia → NYM. The quote resolved "Powered by NYM" (0.0121 ETH → 1,093.85 NYM) and slide-to-confirm broadcast the on-chain payin (Sepolia balance 0.025 → 0.012806 ETH; nonce 1), with the order entering processing.


Note

Low Risk
GUI registration and env schema only; swap execution lives in edge-exchange-plugins and is gated by API key and testnet-only NYM support.

Overview
Registers the NYM centralized swap provider in the GUI so quotes and confirmations can show “Powered by NYM” when the exchange plugin is enabled.

nymswap is wired in swapPlugins with NYM_SWAP_INIT (apiKey in env.json, sent as x-api-key). The id is intentionally separate from the nym currency plugin so both can load in the same plugin namespace.

Also adds testID="confirmSliderThumb" on the slide-to-confirm thumb in SafeSlider (snapshot/test updates only).

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

j0ntz added 2 commits June 9, 2026 14:39
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 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).

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.

1 participant