Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: app crash on unrecognized network name #352

Open
Uriah-Eisenstein-ATT opened this issue Apr 26, 2022 · 1 comment
Open

iOS: app crash on unrecognized network name #352

Uriah-Eisenstein-ATT opened this issue Apr 26, 2022 · 1 comment

Comments

@Uriah-Eisenstein-ATT
Copy link

Example:

const METHOD_DATA = [{
  supportedMethods: ['apple-pay'],
  data: {
    merchantIdentifier: 'merchant.com.your-app.namespace',
    supportedNetworks: ['visa', 'mastercard', 'amex', 'UNKNOWN-NETWORK'],
    countryCode: 'US',
    currencyCode: 'USD'
  }
}];
...
const paymentRequest = new PaymentRequest(METHOD_DATA, DETAILS);

The last line crashes on iOS because of trying to add null to an array, in ReactNativePayments.getSupportedNetworksFromMethodData.

@Uriah-Eisenstein-ATT
Copy link
Author

PR #351 patches this crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant