Skip to content

Commit baeff17

Browse files
committed
Add BRIDGELESS_INIT env config for swap referral id
1 parent 041f90c commit baeff17

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased (develop)
44

55
- added: NYM swap provider (`nymswap`)
6+
- added: Optional Bridgeless swap referral id via the `BRIDGELESS_INIT` env config, passed through to the swap plugin.
67
- changed: Route maestro test builds to a dedicated Zealot channel so they no longer appear in the production release list.
78
- changed: Hide the wallet "Get Raw Keys" option behind Developer Mode, while still showing it for wallets that fail to load.
89
- fixed: Share button referral link now uses the dl.edge.app deep-link domain so appreferred attribution is tracked

src/envConfig.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ export const asEnvConfig = asObject({
240240
})
241241
),
242242
BOTANIX_INIT: asCorePluginInit(asEvmApiKeys),
243+
// Bridgeless is enabled by default (no key required). An optional referralId
244+
// (uint16) is passed through to the swap plugin to earn referral revenue.
245+
BRIDGELESS_INIT: asOptional(
246+
asObject({
247+
referralId: asOptional(asNumber)
248+
}).withRest,
249+
{ referralId: undefined }
250+
),
243251
MAYACHAIN_INIT: asCorePluginInit(asBoolean),
244252
CARDANO_INIT: asCorePluginInit(
245253
asObject({

src/util/corePlugins.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const swapPlugins = {
103103
nymswap: ENV.NYM_SWAP_INIT,
104104

105105
// Defi Swaps
106-
bridgeless: true,
106+
bridgeless: ENV.BRIDGELESS_INIT,
107107
rango: ENV.RANGO_INIT,
108108
spookySwap: false,
109109
mayaprotocol: ENV.MAYA_PROTOCOL_INIT,

0 commit comments

Comments
 (0)