Skip to content

Commit 5a0576f

Browse files
committed
Add Venmo GUI Plugin for buy and sell
1 parent 877093c commit 5a0576f

File tree

8 files changed

+81
-5
lines changed

8 files changed

+81
-5
lines changed

CHANGELOG.md

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

2121
- added: Support for LLD & LLM transaction history
2222
- added: Close button (X) for `EdgeModals,` specifically if a desktop platform is detected.
23+
- added: Venmo GUI plugin via Moonpay.
2324
- changed: Auto-enable required tokens when navigating to `Stake*` scenes
2425
- fixed: Incorrect `SwapInput` amounts on `SwapCreateScene` after changing wallet.
2526
- fixed: Backing up a light account while on the `FiatPluginEnterAmountScene` retains light account-related quote errors

src/__tests__/__snapshots__/GuiPlugins.test.ts.snap

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,20 @@ Settlement: 5 min - 24 hours",
209209
"pluginId": "paypal",
210210
"title": "Paypal",
211211
},
212+
{
213+
"cryptoCodes": [],
214+
"deepPath": "",
215+
"deepQuery": {},
216+
"description": "Fee: ~5%
217+
Settlement: 5 min - 24 hours",
218+
"paymentType": "venmo",
219+
"paymentTypeLogoKey": "venmo",
220+
"paymentTypes": [
221+
"venmo",
222+
],
223+
"pluginId": "venmo",
224+
"title": "Venmo",
225+
},
212226
{
213227
"cryptoCodes": [],
214228
"customTitleKey": "applepay",
@@ -317,6 +331,20 @@ Settlement: 5 min - 24 hours",
317331
"pluginId": "paypal",
318332
"title": "Paypal",
319333
},
334+
{
335+
"cryptoCodes": [],
336+
"deepPath": "",
337+
"deepQuery": {},
338+
"description": "Fee: ~5%
339+
Settlement: 5 min - 24 hours",
340+
"paymentType": "venmo",
341+
"paymentTypeLogoKey": "venmo",
342+
"paymentTypes": [
343+
"venmo",
344+
],
345+
"pluginId": "venmo",
346+
"title": "Venmo",
347+
},
320348
{
321349
"cryptoCodes": [],
322350
"deepPath": "",

src/components/scenes/GuiPluginListScene.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const paymentTypeLogosById = {
8888
revolut: 'paymentTypeLogoRevolut',
8989
sofort: 'paymentTypeLogoSofort',
9090
upi: 'paymentTypeLogoUpi',
91+
venmo: 'paymentTypeVenmo',
9192
visa: 'paymentTypeVisa'
9293
}
9394
const pluginPartnerLogos: { [key: string]: 'guiPluginLogoMoonpay' } = {

src/constants/plugins/GuiPlugins.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,14 @@ export const guiPlugins: { [pluginId: string]: GuiPlugin } = {
232232
lockUriPath: true,
233233
displayName: 'Bitrefill'
234234
},
235+
venmo: {
236+
pluginId: 'amountquote',
237+
storeId: '',
238+
baseUri: '',
239+
lockUriPath: true,
240+
nativePlugin: amountQuoteFiatPlugin,
241+
displayName: ''
242+
},
235243
wire: {
236244
pluginId: 'amountquote',
237245
storeId: '',

src/constants/plugins/buyPluginList.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,17 @@
212212
"cryptoCodes": [],
213213
"paymentTypeLogoKey": "bank"
214214
},
215+
{
216+
"id": "venmo",
217+
"pluginId": "venmo",
218+
"paymentType": "venmo",
219+
"paymentTypes": ["venmo"],
220+
"title": "Venmo",
221+
"description": "Fee: ~5%\nSettlement: 5 min - 24 hours",
222+
"forCountries": ["US"],
223+
"cryptoCodes": [],
224+
"paymentTypeLogoKey": "venmo"
225+
},
215226
{
216227
"id": "wire",
217228
"pluginId": "wire",
@@ -307,6 +318,10 @@
307318
"id": "libertyx",
308319
"sortIndex": 50
309320
},
321+
{
322+
"id": "venmo",
323+
"sortIndex": 15
324+
},
310325
{
311326
"id": "wire",
312327
"sortIndex": 40

src/constants/plugins/sellPluginList.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,17 @@
255255
"type": "sell"
256256
}
257257
},
258+
{
259+
"id": "venmo",
260+
"pluginId": "venmo",
261+
"paymentType": "venmo",
262+
"paymentTypes": ["venmo"],
263+
"title": "Venmo",
264+
"description": "Fee: ~5%\nSettlement: 5 min - 24 hours",
265+
"forCountries": ["US"],
266+
"cryptoCodes": [],
267+
"paymentTypeLogoKey": "venmo"
268+
},
258269
{
259270
"id": "xanpool",
260271
"pluginId": "xanpool",
@@ -320,6 +331,10 @@
320331
"id": "bitrefill",
321332
"sortIndex": 70
322333
},
334+
{
335+
"id": "venmo",
336+
"sortIndex": 15
337+
},
323338
"----- iOS specifics -----",
324339
"----- Country Specifics -----"
325340
]

src/plugins/gui/fiatPluginTypes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const asFiatPaymentType = asValue(
4545
'sepa',
4646
'spei',
4747
'turkishbank',
48+
'venmo',
4849
'wire'
4950
)
5051
export type FiatPaymentType = ReturnType<typeof asFiatPaymentType>

src/plugins/gui/providers/moonpayProvider.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ const pluginDisplayName = 'Moonpay'
3131
const supportEmail = '[email protected]'
3232

3333
const allowedCurrencyCodes: Record<FiatDirection, { [F in FiatPaymentType]?: FiatProviderAssetMap }> = {
34-
buy: { credit: { providerId, fiat: {}, crypto: {} }, paypal: { providerId, fiat: {}, crypto: {} } },
34+
buy: {
35+
credit: { providerId, fiat: {}, crypto: {} },
36+
paypal: { providerId, fiat: {}, crypto: {} },
37+
venmo: { providerId, fiat: {}, crypto: {} }
38+
},
3539
sell: {
3640
credit: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' },
37-
paypal: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' }
41+
paypal: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' },
42+
venmo: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' }
3843
}
3944
}
4045
const allowedCountryCodes: Record<FiatDirection, FiatProviderExactRegions> = { buy: {}, sell: {} }
@@ -108,7 +113,7 @@ const asApiKeys = asString
108113

109114
const asMoonpayCountries = asArray(asMoonpayCountry)
110115

111-
type MoonpayPaymentMethod = 'ach_bank_transfer' | 'credit_debit_card' | 'paypal'
116+
type MoonpayPaymentMethod = 'ach_bank_transfer' | 'credit_debit_card' | 'paypal' | 'venmo'
112117

113118
interface MoonpayWidgetQueryParams {
114119
apiKey: string
@@ -154,7 +159,8 @@ const MOONPAY_PAYMENT_TYPE_MAP: Partial<Record<FiatPaymentType, MoonpayPaymentMe
154159
credit: 'credit_debit_card',
155160
googlepay: 'credit_debit_card',
156161
iach: 'ach_bank_transfer',
157-
paypal: 'paypal'
162+
paypal: 'paypal',
163+
venmo: 'venmo'
158164
}
159165

160166
const NETWORK_CODE_PLUGINID_MAP: StringMap = {
@@ -184,7 +190,8 @@ const PAYMENT_TYPE_MAP: Partial<Record<FiatPaymentType, FiatPaymentType | undefi
184190
applepay: 'credit',
185191
credit: 'credit',
186192
googlepay: 'credit',
187-
paypal: 'paypal'
193+
paypal: 'paypal',
194+
venmo: 'venmo'
188195
}
189196

190197
let lastChecked = 0

0 commit comments

Comments
 (0)