diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a270d16d0d..7b47e10b32c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - added: Support for LLD & LLM transaction history - added: Close button (X) for `EdgeModals,` specifically if a desktop platform is detected. +- added: Venmo GUI plugin via Moonpay. - changed: Auto-enable required tokens when navigating to `Stake*` scenes - fixed: Incorrect `SwapInput` amounts on `SwapCreateScene` after changing wallet. - fixed: Backing up a light account while on the `FiatPluginEnterAmountScene` retains light account-related quote errors diff --git a/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap b/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap index e0d14f1a264..c81a2ae1e6c 100644 --- a/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap +++ b/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap @@ -209,6 +209,20 @@ Settlement: 5 min - 24 hours", "pluginId": "paypal", "title": "Paypal", }, + { + "cryptoCodes": [], + "deepPath": "", + "deepQuery": {}, + "description": "Fee: ~5% +Settlement: 5 min - 24 hours", + "paymentType": "venmo", + "paymentTypeLogoKey": "venmo", + "paymentTypes": [ + "venmo", + ], + "pluginId": "venmo", + "title": "Venmo", + }, { "cryptoCodes": [], "customTitleKey": "applepay", @@ -317,6 +331,20 @@ Settlement: 5 min - 24 hours", "pluginId": "paypal", "title": "Paypal", }, + { + "cryptoCodes": [], + "deepPath": "", + "deepQuery": {}, + "description": "Fee: ~5% +Settlement: 5 min - 24 hours", + "paymentType": "venmo", + "paymentTypeLogoKey": "venmo", + "paymentTypes": [ + "venmo", + ], + "pluginId": "venmo", + "title": "Venmo", + }, { "cryptoCodes": [], "deepPath": "", diff --git a/src/components/scenes/GuiPluginListScene.tsx b/src/components/scenes/GuiPluginListScene.tsx index a187cb0ebcb..67e308d3fc6 100644 --- a/src/components/scenes/GuiPluginListScene.tsx +++ b/src/components/scenes/GuiPluginListScene.tsx @@ -88,6 +88,7 @@ const paymentTypeLogosById = { revolut: 'paymentTypeLogoRevolut', sofort: 'paymentTypeLogoSofort', upi: 'paymentTypeLogoUpi', + venmo: 'paymentTypeVenmo', visa: 'paymentTypeVisa' } const pluginPartnerLogos: { [key: string]: 'guiPluginLogoMoonpay' } = { diff --git a/src/constants/plugins/GuiPlugins.ts b/src/constants/plugins/GuiPlugins.ts index fcd0341b9f1..9880c27a39c 100644 --- a/src/constants/plugins/GuiPlugins.ts +++ b/src/constants/plugins/GuiPlugins.ts @@ -232,6 +232,14 @@ export const guiPlugins: { [pluginId: string]: GuiPlugin } = { lockUriPath: true, displayName: 'Bitrefill' }, + venmo: { + pluginId: 'amountquote', + storeId: '', + baseUri: '', + lockUriPath: true, + nativePlugin: amountQuoteFiatPlugin, + displayName: '' + }, wire: { pluginId: 'amountquote', storeId: '', diff --git a/src/constants/plugins/buyPluginList.json b/src/constants/plugins/buyPluginList.json index ed531b92ffe..2e60986f5c1 100644 --- a/src/constants/plugins/buyPluginList.json +++ b/src/constants/plugins/buyPluginList.json @@ -1,4 +1,20 @@ [ + { + "id": "bitsofgold", + "pluginId": "bitsofgold", + "paymentTypes": ["bank"], + "title": "Israeli Bank Transfer", + "description": "Fee: 5.95%\nSettlement: 1 - 48 hours", + "partnerIconPath": "bits-of-gold-logo-sm.png", + "forCountries": ["IL"], + "cryptoCodes": ["BTC", "ETH"], + "paymentTypeLogoKey": "bank", + "deepPath": "/order/buy", + "deepQuery": { + "order_id": "null", + "page": "0" + } + }, { "id": "creditcard", "pluginId": "creditcard", @@ -58,44 +74,6 @@ "cryptoCodes": [], "paymentTypeLogoKey": "bank" }, - { - "id": "wire", - "pluginId": "wire", - "paymentType": "wire", - "paymentTypes": ["wire"], - "title": "Bank Wire Transfer", - "description": "Fee: ~2%\nSettlement: ~5 minutes\nLimit $10000", - "forCountries": ["US"], - "notStateProvinces": { "US": ["AK", "AR", "CT", "NC", "NY", "TX", "FL"] }, - "cryptoCodes": [], - "paymentTypeLogoKey": "bank" - }, - { - "id": "sepa", - "pluginId": "sepa", - "forCountries": [ - "AT", "BE", "BG", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", - "FR", "GB", "GR", "HR", "HU", "IE", "IT", "LI", "LT", "LU", - "LV", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "SM" - ], - "paymentType": "sepa", - "paymentTypes": ["sepa"], - "description": "Fee: 1.55%\nSettlement: 1 - 2 days", - "title": "SEPA Bank Transfer", - "paymentTypeLogoKey": "bank" - }, - { - "id": "libertyx", - "pluginId": "libertyx", - "paymentTypes": ["cash", "credit"], - "description": "Fee: 3-8%\nSettlement: Instant", - "title": "In-person Cash and Debit Card", - "partnerIconPath": "libertyXlogo.png", - "forCountries": ["US"], - "cryptoCodes": ["BTC"], - "paymentTypeLogoKey": "cash", - "deepPath": "/" - }, { "id": "ideal", "pluginId": "ideal", @@ -118,6 +96,18 @@ "cryptoCodes": [], "paymentTypeLogoKey": "interac" }, + { + "id": "libertyx", + "pluginId": "libertyx", + "paymentTypes": ["cash", "credit"], + "description": "Fee: 3-8%\nSettlement: Instant", + "title": "In-person Cash and Debit Card", + "partnerIconPath": "libertyXlogo.png", + "forCountries": ["US"], + "cryptoCodes": ["BTC"], + "paymentTypeLogoKey": "cash", + "deepPath": "/" + }, { "id": "payid", "pluginId": "payid", @@ -187,14 +177,17 @@ "paymentTypeLogoKey": "revolut" }, { - "id": "turkishbank", - "pluginId": "turkishbank", - "paymentType": "turkishbank", - "paymentTypes": ["turkishbank"], - "title": "Turkish Bank Transfer", - "description": "Fee: 8-9%\nSettlement: Instant - 1 hour", - "forCountries": [], - "cryptoCodes": [], + "id": "sepa", + "pluginId": "sepa", + "forCountries": [ + "AT", "BE", "BG", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", + "FR", "GB", "GR", "HR", "HU", "IE", "IT", "LI", "LT", "LU", + "LV", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "SM" + ], + "paymentType": "sepa", + "paymentTypes": ["sepa"], + "description": "Fee: 1.55%\nSettlement: 1 - 2 days", + "title": "SEPA Bank Transfer", "paymentTypeLogoKey": "bank" }, { @@ -209,20 +202,38 @@ "paymentTypeLogoKey": "bank" }, { - "id": "bitsofgold", - "pluginId": "bitsofgold", - "paymentTypes": ["bank"], - "title": "Israeli Bank Transfer", - "description": "Fee: 5.95%\nSettlement: 1 - 48 hours", - "partnerIconPath": "bits-of-gold-logo-sm.png", - "forCountries": ["IL"], - "cryptoCodes": ["BTC", "ETH"], - "paymentTypeLogoKey": "bank", - "deepPath": "/order/buy", - "deepQuery": { - "order_id": "null", - "page": "0" - } + "id": "turkishbank", + "pluginId": "turkishbank", + "paymentType": "turkishbank", + "paymentTypes": ["turkishbank"], + "title": "Turkish Bank Transfer", + "description": "Fee: 8-9%\nSettlement: Instant - 1 hour", + "forCountries": [], + "cryptoCodes": [], + "paymentTypeLogoKey": "bank" + }, + { + "id": "venmo", + "pluginId": "venmo", + "paymentType": "venmo", + "paymentTypes": ["venmo"], + "title": "Venmo", + "description": "Fee: ~5%\nSettlement: 5 min - 24 hours", + "forCountries": ["US"], + "cryptoCodes": [], + "paymentTypeLogoKey": "venmo" + }, + { + "id": "wire", + "pluginId": "wire", + "paymentType": "wire", + "paymentTypes": ["wire"], + "title": "Bank Wire Transfer", + "description": "Fee: ~2%\nSettlement: ~5 minutes\nLimit $10000", + "forCountries": ["US"], + "notStateProvinces": { "US": ["AK", "AR", "CT", "NC", "NY", "TX", "FL"] }, + "cryptoCodes": [], + "paymentTypeLogoKey": "bank" }, { "id": "xanpool", @@ -307,6 +318,10 @@ "id": "libertyx", "sortIndex": 50 }, + { + "id": "venmo", + "sortIndex": 15 + }, { "id": "wire", "sortIndex": 40 diff --git a/src/constants/plugins/sellPluginList.json b/src/constants/plugins/sellPluginList.json index 94aa43aa1d6..ff8636f8a0e 100644 --- a/src/constants/plugins/sellPluginList.json +++ b/src/constants/plugins/sellPluginList.json @@ -18,16 +18,88 @@ "paymentTypeLogoKey": "bank" }, { - "id": "directtobank", - "pluginId": "directtobank", - "paymentType": "directtobank", + "id": "bitsofgold", + "pluginId": "bitsofgold", "paymentTypes": [ - "directtobank" + "bank" ], - "title": "Bank Transfer", - "description": "Fee: 1.5%\nSettlement: 5 min - 24 hours", + "title": "Israeli Bank Transfer", + "description": "Fee: 6.95% / Settlement: 1 - 48 hours\nLevel 1 Limit: €10000/day\nLevel 2 Limit: Unlimited", + "partnerIconPath": "bits-of-gold-logo-sm.png", "forCountries": [ - "AU" + "IL" + ], + "cryptoCodes": [ + "BTC", + "ETH" + ], + "paymentTypeLogoKey": "bank", + "deepPath": "/order/sell", + "deepQuery": { + "order_id": "null", + "page": "0", + "utm_source": "Edge", + "utm_medium": "mobile_app", + "utm_campaign": "co", + "etag": "true" + } + }, + { + "id": "bitrefill", + "pluginId": "bitrefill", + "paymentTypes": [ + "giftcard" + ], + "description": "Buy gift cards and reload phones with crypto", + "title": "Gift Cards", + "partnerIconPath": "bitrefill-2.png", + "forCountries": [ + "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", + "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", + "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", + "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", + "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", + "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", + "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", + "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", + "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", + "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", + "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", + "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", + "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", + "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", + "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", + "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", + "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", + "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", + "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", + "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", + "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", + "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", + "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", + "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", + "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW" + ], + "cryptoCodes": [ + "BTC", + "DASH", + "DOGE", + "ETH", + "LTC" + ], + "paymentTypeLogoKey": "giftcard" + }, + { + "id": "colombiabank", + "pluginId": "colombiabank", + "paymentType": "colombiabank", + "paymentTypes": [ + "colombiabank" + ], + "title": "Colombia Bank Transfer ", + "description": "Fee: ~7%\nSettlement: 5 min - 24 hours", + "forCountries": [ + "CO" ], "cryptoCodes": [], "paymentTypeLogoKey": "bank" @@ -52,16 +124,16 @@ "paymentTypeLogoKey": "bank" }, { - "id": "colombiabank", - "pluginId": "colombiabank", - "paymentType": "colombiabank", + "id": "directtobank", + "pluginId": "directtobank", + "paymentType": "directtobank", "paymentTypes": [ - "colombiabank" + "directtobank" ], - "title": "Colombia Bank Transfer ", - "description": "Fee: ~7%\nSettlement: 5 min - 24 hours", + "title": "Bank Transfer", + "description": "Fee: 1.5%\nSettlement: 5 min - 24 hours", "forCountries": [ - "CO" + "AU" ], "cryptoCodes": [], "paymentTypeLogoKey": "bank" @@ -143,76 +215,23 @@ "paymentTypeLogoKey": "pix" }, { - "id": "bitsofgold", - "pluginId": "bitsofgold", - "paymentTypes": [ - "bank" - ], - "title": "Israeli Bank Transfer", - "description": "Fee: 6.95% / Settlement: 1 - 48 hours\nLevel 1 Limit: €10000/day\nLevel 2 Limit: Unlimited", - "partnerIconPath": "bits-of-gold-logo-sm.png", - "forCountries": [ - "IL" - ], - "cryptoCodes": [ - "BTC", - "ETH" - ], - "paymentTypeLogoKey": "bank", - "deepPath": "/order/sell", - "deepQuery": { - "order_id": "null", - "page": "0", - "utm_source": "Edge", - "utm_medium": "mobile_app", - "utm_campaign": "co", - "etag": "true" - } - }, - { - "id": "bitrefill", - "pluginId": "bitrefill", - "paymentTypes": [ - "giftcard" - ], - "description": "Buy gift cards and reload phones with crypto", - "title": "Gift Cards", - "partnerIconPath": "bitrefill-2.png", - "forCountries": [ - "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", - "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", - "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", - "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", - "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", - "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", - "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", - "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", - "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", - "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", - "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", - "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", - "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", - "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", - "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", - "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", - "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", - "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", - "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", - "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", - "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", - "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", - "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", - "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", - "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW" - ], - "cryptoCodes": [ - "BTC", - "DASH", - "DOGE", - "ETH", - "LTC" + "##": "Disabled for now", + "id": "revolut", + "pluginId": "revolut", + "paymentType": "revolut", + "paymentTypes": ["revolut"], + "title": "Revolut", + "description": "Fee: ~5%\nSettlement: 5 min - 24 hours", + "forCountries": [], + "-forCountries": [ + "AU", "BR", "AT", "BE", "BG", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", + "FR", "GR", "HR", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", + "MT", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "JP", "NZ", + "SG", "CH", "GB", "US", "IO", "IM", "JE", "GG", "GF", "GP", "YT", + "MQ", "RE", "MF" ], - "paymentTypeLogoKey": "giftcard" + "cryptoCodes": [], + "paymentTypeLogoKey": "revolut" }, { "id": "sepa", @@ -237,23 +256,15 @@ } }, { - "##": "Disabled for now", - "id": "revolut", - "pluginId": "revolut", - "paymentType": "revolut", - "paymentTypes": ["revolut"], - "title": "Revolut", + "id": "venmo", + "pluginId": "venmo", + "paymentType": "venmo", + "paymentTypes": ["venmo"], + "title": "Venmo", "description": "Fee: ~5%\nSettlement: 5 min - 24 hours", - "forCountries": [], - "-forCountries": [ - "AU", "BR", "AT", "BE", "BG", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", - "FR", "GR", "HR", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", - "MT", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "JP", "NZ", - "SG", "CH", "GB", "US", "IO", "IM", "JE", "GG", "GF", "GP", "YT", - "MQ", "RE", "MF" - ], + "forCountries": ["US"], "cryptoCodes": [], - "paymentTypeLogoKey": "revolut" + "paymentTypeLogoKey": "venmo" }, { "id": "xanpool", @@ -320,6 +331,10 @@ "id": "bitrefill", "sortIndex": 70 }, + { + "id": "venmo", + "sortIndex": 15 + }, "----- iOS specifics -----", "----- Country Specifics -----" ] diff --git a/src/plugins/gui/fiatPluginTypes.ts b/src/plugins/gui/fiatPluginTypes.ts index d6ab44a1832..7fef375fe45 100644 --- a/src/plugins/gui/fiatPluginTypes.ts +++ b/src/plugins/gui/fiatPluginTypes.ts @@ -45,6 +45,7 @@ export const asFiatPaymentType = asValue( 'sepa', 'spei', 'turkishbank', + 'venmo', 'wire' ) export type FiatPaymentType = ReturnType diff --git a/src/plugins/gui/providers/moonpayProvider.ts b/src/plugins/gui/providers/moonpayProvider.ts index dc1084f9a25..1f754f099b4 100644 --- a/src/plugins/gui/providers/moonpayProvider.ts +++ b/src/plugins/gui/providers/moonpayProvider.ts @@ -31,10 +31,15 @@ const pluginDisplayName = 'Moonpay' const supportEmail = 'support@moonpay.com' const allowedCurrencyCodes: Record = { - buy: { credit: { providerId, fiat: {}, crypto: {} }, paypal: { providerId, fiat: {}, crypto: {} } }, + buy: { + credit: { providerId, fiat: {}, crypto: {} }, + paypal: { providerId, fiat: {}, crypto: {} }, + venmo: { providerId, fiat: {}, crypto: {} } + }, sell: { credit: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' }, - paypal: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' } + paypal: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' }, + venmo: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' } } } const allowedCountryCodes: Record = { buy: {}, sell: {} } @@ -108,7 +113,7 @@ const asApiKeys = asString const asMoonpayCountries = asArray(asMoonpayCountry) -type MoonpayPaymentMethod = 'ach_bank_transfer' | 'credit_debit_card' | 'paypal' +type MoonpayPaymentMethod = 'ach_bank_transfer' | 'credit_debit_card' | 'paypal' | 'venmo' interface MoonpayWidgetQueryParams { apiKey: string @@ -154,7 +159,8 @@ const MOONPAY_PAYMENT_TYPE_MAP: Partial