Enable NYM swap provider#6023
Open
j0ntz wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
EdgeApp/edge-exchange-plugins#457
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Description
Enable the NYM swap provider (added in edge-exchange-plugins#457).
src/util/corePlugins.ts: registernymswap: ENV.NYM_SWAP_INITinswapPlugins. The swap plugin id isnymswap, intentionally distinct from thenymcurrency plugin id (edge-core-js keys all plugins in one namespace; reusingnymsilently drops the swap plugin).src/envConfig.ts: addNYM_SWAP_INIT({ apiKey }, sent as thex-api-keyheader).Configure the key in
env.json: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
Small config-only change following existing swap-plugin patterns; no auth or payment logic touched in this repo.
Overview
Wires the NYM swap provider into the app so it can appear in the swap flow (depends on
edge-exchange-plugins).Registers centralized swap plugin
nymswapincorePlugins.tswith init fromNYM_SWAP_INIT, separate from the existingnymcurrency plugin id.envConfig.tsaddsNYM_SWAP_INITwith optionalapiKeyforenv.json(sent asx-api-key). CHANGELOG notes the new provider.Reviewed by Cursor Bugbot for commit 0fb5ba4. Bugbot is set up for automated code reviews on this repo. Configure here.