From c8d9495258f6c4a8920f20788033c75760e8c29f Mon Sep 17 00:00:00 2001 From: peachbits Date: Fri, 20 Sep 2024 14:08:41 -0700 Subject: [PATCH 1/2] Use unique ENV configs for thorchain and thorchainda swap plugins --- CHANGELOG.md | 1 + src/envConfig.ts | 8 ++++++++ src/util/corePlugins.ts | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7f31745bf3..872d55534b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - added: Buy conversion tracking for Moonpay - added: Error tracking for failure to report conversions to referral server - changed: Remove whitespaces from custom token contract address input +- changed: Use unique ENV configs for thorchain and thorchainda swap plugins - fixed: Correctly tag `tokenApproval` `actionType` in `getTxActionDisplayInfo` - fixed: AddressTile2 touchable area states - fixed: Cases where it was possible to create duplicate custom tokens diff --git a/src/envConfig.ts b/src/envConfig.ts index 5be035d1979..2ed530bfa4c 100644 --- a/src/envConfig.ts +++ b/src/envConfig.ts @@ -276,6 +276,14 @@ export const asEnvConfig = asObject({ }).withRest ), THORCHAIN_INIT: asCorePluginInit( + asObject({ + affiliateFeeBasis: asOptional(asString, '50'), + appId: asOptional(asString, 'edge'), + ninerealmsClientId: asOptional(asString, ''), + thorname: asOptional(asString, 'ej') + }).withRest + ), + THORCHAIN_DA_INIT: asCorePluginInit( asObject({ affiliateFeeBasis: asOptional(asString, '50'), appId: asOptional(asString, 'edge'), diff --git a/src/util/corePlugins.ts b/src/util/corePlugins.ts index 5b0fe0b06f4..7e48dbde053 100644 --- a/src/util/corePlugins.ts +++ b/src/util/corePlugins.ts @@ -89,7 +89,7 @@ export const swapPlugins = { rango: ENV.RANGO_INIT, spookySwap: false, thorchain: ENV.THORCHAIN_INIT, - thorchainda: ENV.THORCHAIN_INIT, + thorchainda: ENV.THORCHAIN_DA_INIT, tombSwap: ENV.TOMB_SWAP_INIT, velodrome: true, xrpdex: ENV.XRPDEX_INIT, From 0a8bd4e2080223099634b036e607de5cdd07b827 Mon Sep 17 00:00:00 2001 From: peachbits Date: Fri, 20 Sep 2024 14:32:57 -0700 Subject: [PATCH 2/2] Add Maya Protocol --- CHANGELOG.md | 1 + src/actions/CategoriesActions.ts | 1 + src/components/services/ContactsLoader.ts | 12 ++++++++++++ src/envConfig.ts | 7 +++++++ src/util/corePlugins.ts | 1 + 5 files changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 872d55534b3..4017a8b9ec3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- added: Add Maya Protocol - added: Re-enable Piratechain on iOS - added: Battery Saver warning message for Android - added: Buy conversion tracking for Moonpay diff --git a/src/actions/CategoriesActions.ts b/src/actions/CategoriesActions.ts index d72f0e7736c..3e0623f2b31 100644 --- a/src/actions/CategoriesActions.ts +++ b/src/actions/CategoriesActions.ts @@ -536,6 +536,7 @@ export const pluginIdIcons: Record = { godex: EDGE_CONTENT_SERVER_URI + '/godex.png', letsexchange: EDGE_CONTENT_SERVER_URI + '/letsexchange-logo.png', lifi: EDGE_CONTENT_SERVER_URI + '/lifi.png', + mayaprotocol: EDGE_CONTENT_SERVER_URI + '/mayaprotocol.png', rango: EDGE_CONTENT_SERVER_URI + '/rango.png', sideshift: EDGE_CONTENT_SERVER_URI + '/sideshift-logo.png', simplex: EDGE_CONTENT_SERVER_URI + '/simplex.png', diff --git a/src/components/services/ContactsLoader.ts b/src/components/services/ContactsLoader.ts index abda5f99033..19d3f913b06 100644 --- a/src/components/services/ContactsLoader.ts +++ b/src/components/services/ContactsLoader.ts @@ -233,6 +233,18 @@ const merchantPartners = [ familyName: '', recordID: '' }, + { + givenName: 'Maya Protocol', + hasThumbnail: true, + thumbnailPath: 'mayaprotocol.png', + emailAddresses: [], + postalAddresses: [], + middleName: '', + company: '', + jobTitle: '', + familyName: '', + recordID: '' + }, { givenName: 'Thorchain', hasThumbnail: true, diff --git a/src/envConfig.ts b/src/envConfig.ts index 2ed530bfa4c..759c4e30d36 100644 --- a/src/envConfig.ts +++ b/src/envConfig.ts @@ -275,6 +275,13 @@ export const asEnvConfig = asObject({ apiKey: asOptional(asString, '') }).withRest ), + MAYA_PROTOCOL_INIT: asCorePluginInit( + asObject({ + affiliateFeeBasis: asOptional(asString, '50'), + appId: asOptional(asString, 'edge'), + thorname: asOptional(asString, 'ej') + }).withRest + ), THORCHAIN_INIT: asCorePluginInit( asObject({ affiliateFeeBasis: asOptional(asString, '50'), diff --git a/src/util/corePlugins.ts b/src/util/corePlugins.ts index 7e48dbde053..09b9027e50b 100644 --- a/src/util/corePlugins.ts +++ b/src/util/corePlugins.ts @@ -88,6 +88,7 @@ export const swapPlugins = { // Defi Swaps rango: ENV.RANGO_INIT, spookySwap: false, + mayaprotocol: ENV.MAYA_PROTOCOL_INIT, thorchain: ENV.THORCHAIN_INIT, thorchainda: ENV.THORCHAIN_DA_INIT, tombSwap: ENV.TOMB_SWAP_INIT,