Skip to content

Commit 1c1839d

Browse files
authored
Merge pull request #6057 from EdgeApp/jon/banxa-klarna-paypal
Enable Klarna and PayPal on the Banxa buy path
2 parents df5bb5e + 97f01c4 commit 1c1839d

17 files changed

Lines changed: 36 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- added: Changelly swap provider
88
- added: NYM swap provider (`nymswap`)
99
- added: Optional Bridgeless swap referral id via the `BRIDGELESS_INIT` env config, passed through to the swap plugin.
10+
- added: Klarna and PayPal payment options on the Banxa buy path.
1011
- changed: Route maestro test builds to a dedicated Zealot channel so they no longer appear in the production release list.
1112
- changed: Hide the wallet "Get Raw Keys" option behind Developer Mode, while still showing it for wallets that fail to load.
1213
- fixed: Share button referral link now uses the dl.edge.app deep-link domain so appreferred attribution is tracked

src/__tests__/util/paymentTypeIcons.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ describe('paymentTypeIcons', () => {
1212
paymentTypeLogoGooglePay: { uri: 'google-pay-icon.png' },
1313
paymentTypeLogoIdeal: { uri: 'ideal-icon.png' },
1414
paymentTypeLogoInterac: { uri: 'interac-icon.png' },
15+
paymentTypeLogoKlarna: { uri: 'klarna-icon.png' },
1516
paymentTypeLogoPayid: { uri: 'payid-icon.png' },
1617
paymentTypeLogoPaypal: { uri: 'paypal-icon.png' },
1718
paymentTypeLogoPix: { uri: 'pix-icon.png' },
@@ -24,6 +25,7 @@ describe('paymentTypeIcons', () => {
2425
expect(getPaymentTypeThemeKey('applepay')).toBe('paymentTypeLogoApplePay')
2526
expect(getPaymentTypeThemeKey('credit')).toBe('paymentTypeLogoCreditCard')
2627
expect(getPaymentTypeThemeKey('paypal')).toBe('paymentTypeLogoPaypal')
28+
expect(getPaymentTypeThemeKey('klarna')).toBe('paymentTypeLogoKlarna')
2729
})
2830

2931
it('should return bank transfer key for fallback payment types', () => {
@@ -41,6 +43,9 @@ describe('paymentTypeIcons', () => {
4143
expect(getPaymentTypeIcon('credit', mockTheme)).toEqual({
4244
uri: 'credit-card-icon.png'
4345
})
46+
expect(getPaymentTypeIcon('klarna', mockTheme)).toEqual({
47+
uri: 'klarna-icon.png'
48+
})
4449
})
4550

4651
it('should return bank transfer icon for fallback payment types', () => {

src/__tests__/util/paymentTypeUtils.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ describe('paymentTypeUtils', () => {
1010
expect(getPaymentTypeDisplayName('credit')).toBe('Credit and Debit Card')
1111
expect(getPaymentTypeDisplayName('venmo')).toBe('Venmo')
1212
expect(getPaymentTypeDisplayName('sepa')).toBe('SEPA Bank Transfer')
13+
expect(getPaymentTypeDisplayName('klarna')).toBe('Klarna')
14+
expect(getPaymentTypeDisplayName('paypal')).toBe('Paypal')
1315
})
1416

1517
it('should return original value for unknown payment types', () => {
17.7 KB
Loading

src/components/scenes/RampCreateScene.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,10 @@ export const RampCreateScene: React.FC<Props> = (props: Props) => {
811811
{/* Amount Inputs */}
812812
{/* Top Input (Fiat) */}
813813
<View style={styles.inputRowView}>
814-
<DropdownInputButton onPress={handleFiatDropdown}>
814+
<DropdownInputButton
815+
onPress={handleFiatDropdown}
816+
testID="rampFiatDropdown"
817+
>
815818
{selectedFiatFlagUri !== '' ? (
816819
<ShadowedView style={styles.shadowedIcon}>
817820
<FastImage

src/locales/en_US.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,6 +2167,7 @@ const strings = {
21672167
instant_ach_bank_transfer: 'Instant ACH Bank Transfer',
21682168
ideal: 'iDEAL',
21692169
interac_e_transfer: 'Interac e-Transfer',
2170+
klarna: 'Klarna',
21702171
mexico_bank_transfer: 'Mexico Bank Transfer',
21712172
payid: 'PayID',
21722173
paypal: 'Paypal',

src/locales/strings/enUS.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,6 +1664,7 @@
16641664
"instant_ach_bank_transfer": "Instant ACH Bank Transfer",
16651665
"ideal": "iDEAL",
16661666
"interac_e_transfer": "Interac e-Transfer",
1667+
"klarna": "Klarna",
16671668
"mexico_bank_transfer": "Mexico Bank Transfer",
16681669
"payid": "PayID",
16691670
"paypal": "Paypal",

src/plugins/gui/fiatPluginTypes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export const asFiatPaymentType = asValue(
5757
'ideal',
5858
'interac',
5959
'iobank',
60+
'klarna',
6061
'mexicobank',
6162
'payid',
6263
'paypal',

src/plugins/ramps/banxa/banxaRampPlugin.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ const allowedPaymentTypes: AllowedPaymentTypes = {
9292
ideal: true,
9393
interac: true,
9494
iobank: true,
95+
klarna: true,
9596
payid: true,
97+
paypal: true,
9698
pix: true,
9799
sepa: false, // Leave this to Bity for now
98100
turkishbank: true
@@ -153,11 +155,13 @@ const asBanxaPaymentType = asValue(
153155
'DLOCALPIX',
154156
'DLOCALZAIO',
155157
'IDEAL',
158+
'KLARNACKO',
156159
'MANUALPAYMENT',
157160
'MONOOVAPAYID',
158161
'PRIMERAP',
159162
'PRIMERCC',
160163
'PRIMERGP',
164+
'PRIMERPAYPAL',
161165
'WORLDPAYGOOGLE',
162166
'ZHACHSELL'
163167
)
@@ -335,11 +339,13 @@ const typeMap: Record<BanxaPaymentType, FiatPaymentType> = {
335339
DLOCALPIX: 'pix',
336340
DLOCALZAIO: 'iobank',
337341
IDEAL: 'ideal',
342+
KLARNACKO: 'klarna',
338343
MANUALPAYMENT: 'turkishbank',
339344
MONOOVAPAYID: 'payid',
340345
PRIMERAP: 'applepay',
341346
PRIMERCC: 'credit',
342347
PRIMERGP: 'googlepay',
348+
PRIMERPAYPAL: 'paypal',
343349
WORLDPAYGOOGLE: 'googlepay',
344350
ZHACHSELL: 'ach'
345351
}

src/plugins/ramps/utils/getSettlementRange.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ export function getBuySettlementRange(
6161
case 'iobank':
6262
// Not listed in GUI plugin lists; assume typical window
6363
return RANGE(5, 'minutes', 24, 'hours')
64+
case 'klarna':
65+
return RANGE(5, 'minutes', 24, 'hours')
6466
case 'mexicobank':
6567
return RANGE(5, 'minutes', 24, 'hours')
6668
case 'payid':
@@ -116,6 +118,8 @@ export function getSellSettlementRange(
116118
case 'iobank':
117119
// Not listed in GUI plugin lists; assume typical window
118120
return RANGE(5, 'minutes', 24, 'hours')
121+
case 'klarna':
122+
return RANGE(5, 'minutes', 24, 'hours')
119123
case 'mexicobank':
120124
return RANGE(5, 'minutes', 24, 'hours')
121125
case 'payid':

0 commit comments

Comments
 (0)