Skip to content

Commit 2c377f4

Browse files
peachbitschangellyclaude
committed
Feat: Changelly integration
Enable the changelly swap plugin, with API credentials supplied via initOptions and stored XOR-obfuscated in env.json. Co-authored-by: Changelly <changelly@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 7b75f33 commit 2c377f4

5 files changed

Lines changed: 19 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased (develop)
44

5+
- added: Changelly swap provider
56
- added: NYM swap provider (`nymswap`)
67
- added: Optional Bridgeless swap referral id via the `BRIDGELESS_INIT` env config, passed through to the swap plugin.
78
- changed: Route maestro test builds to a dedicated Zealot channel so they no longer appear in the production release list.

src/actions/CategoriesActions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@ export const pluginIdIcons: Record<string, string> = {
712712
bridgeless: EDGE_CONTENT_SERVER_URI + '/bridgeless.png',
713713
changenow: EDGE_CONTENT_SERVER_URI + '/changenow.png',
714714
changehero: EDGE_CONTENT_SERVER_URI + '/changehero.png',
715+
changelly: EDGE_CONTENT_SERVER_URI + '/changelly.png',
715716
cosmosibc: EDGE_CONTENT_SERVER_URI + '/cosmosibc.png',
716717
exolix: EDGE_CONTENT_SERVER_URI + '/exolix-logo.png',
717718
fantomsonicupgrade: EDGE_CONTENT_SERVER_URI + '/fantomsonicupgrade.png',

src/components/modals/SwapVerifyTermsModal.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ const pluginData: Record<string, TermsUri> = {
3131
privacyUri: 'https://changenow.io/privacy-policy',
3232
kycUri: 'https://changenow.io/faq/kyc'
3333
},
34+
changelly: {
35+
termsUri: 'https://changelly.com/terms-of-use',
36+
privacyUri: 'https://changelly.com/privacy-policy',
37+
kycUri: 'https://changelly.com/aml-kyc'
38+
},
3439
exolix: {
3540
termsUri: 'https://exolix.com/terms',
3641
privacyUri: 'https://exolix.com/privacy',

src/envConfig.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { asInitOptions as asPaybisInitOptions } from './plugins/ramps/paybis/pay
1919
import { asInitOptions as asRevolutInitOptions } from './plugins/ramps/revolut/revolutRampTypes'
2020
import { asInitOptions as asSimplexInitOptions } from './plugins/ramps/simplex/simplexRampTypes'
2121
import { asBase16 } from './util/cleaners/asHex'
22+
import { asObfuscatedString } from './util/cleaners/asObfuscatedString'
2223

2324
function asNullable<T>(cleaner: Cleaner<T>): Cleaner<T | null> {
2425
return function asNullable(raw) {
@@ -274,6 +275,16 @@ export const asEnvConfig = asObject({
274275
apiKey: asOptional(asString, '')
275276
}).withRest
276277
),
278+
CHANGELLY_INIT: asCorePluginInit(
279+
asObject({
280+
// Arrays of XOR-masked char codes; see asObfuscatedString.
281+
// No fallback values: the plugin itself refuses to load when either
282+
// member is missing, so a partial entry disables Changelly instead of
283+
// supplying placeholder credentials.
284+
apiKey: asOptional(asObfuscatedString),
285+
partnerId: asOptional(asString)
286+
}).withRest
287+
),
277288
COREUM_INIT: asCorePluginInit(asBoolean),
278289
COSMOSHUB_INIT: asCorePluginInit(asBoolean),
279290
DASH_INIT: asCorePluginInit(

src/util/corePlugins.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export const swapPlugins = {
9292
// Centralized Swaps
9393
changehero: ENV.CHANGEHERO_INIT,
9494
changenow: ENV.CHANGE_NOW_INIT,
95+
changelly: ENV.CHANGELLY_INIT,
9596
exolix: ENV.EXOLIX_INIT,
9697
godex: ENV.GODEX_INIT,
9798
lifi: ENV.LIFI_INIT,

0 commit comments

Comments
 (0)