Skip to content

Commit 5d8db11

Browse files
committed
fixup! Add DFX fiat ramp provider
1 parent 16195c7 commit 5d8db11

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/plugins/ramps/dfx/dfxRampPlugin.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ const DFX_CRYPTO_ASSETS = [
5858

5959
export const dfxRampPlugin: RampPluginFactory = config => {
6060
const initOptions = asInitOptions(config.initOptions)
61+
const deepQuery = {
62+
wallet: initOptions.wallet,
63+
lang: 'en'
64+
}
6165

6266
return createExternalRampPlugin(
6367
'dfx',
@@ -71,10 +75,7 @@ export const dfxRampPlugin: RampPluginFactory = config => {
7175
cryptoAssets: DFX_CRYPTO_ASSETS,
7276
settlementRange: SETTLEMENT_ONE_TO_THREE_DAYS,
7377
deepPath: '/buy',
74-
deepQuery: {
75-
wallet: 'Edge',
76-
lang: 'en'
77-
}
78+
deepQuery
7879
},
7980
sell: {
8081
paymentTypes: ['sepa'],
@@ -83,10 +84,7 @@ export const dfxRampPlugin: RampPluginFactory = config => {
8384
cryptoAssets: DFX_CRYPTO_ASSETS,
8485
settlementRange: SETTLEMENT_ONE_TO_THREE_DAYS,
8586
deepPath: '/sell',
86-
deepQuery: {
87-
wallet: 'Edge',
88-
lang: 'en'
89-
}
87+
deepQuery
9088
}
9189
},
9290
config

src/plugins/ramps/dfx/dfxRampTypes.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ import { asObject, asOptional, asString } from 'cleaners'
22

33
export interface InitOptions {
44
readonly partnerIcon: string
5+
// Partner/wallet identifier sent to the DFX widget. Override per build so
6+
// white-label apps do not identify as Edge.
7+
readonly wallet: string
58
}
69

710
export const asInitOptions = asObject<InitOptions>({
8-
partnerIcon: asOptional(asString, `https://content.edge.app/dfx-logo.png`)
11+
partnerIcon: asOptional(asString, `https://content.edge.app/dfx-logo.png`),
12+
wallet: asOptional(asString, 'Edge')
913
}).withRest

0 commit comments

Comments
 (0)