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

fix: manually forward activity results to paymentLauncherFragment #932

Merged

Conversation

charliecruzan-stripe
Copy link
Collaborator

@charliecruzan-stripe charliecruzan-stripe commented May 9, 2022

Summary

Added forwarding of activity result to the paymentLauncherFragment

Motivation

Without this, only on older versions of RN, the result is never passed to the fragment and promises would never resolve for calls to confirmSetupIntent and confirmPayment.

Testing

  • I tested this manually
  • I added automated tests

It should be noted that this can duplicate calls to the payment result callback, but it's not really an issue since calling promise.resolve on an already resolved promise is a no-op.

When we don't want to support RN 64 and below anymore, I believe these three lines can be removed.

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

@charliecruzan-stripe charliecruzan-stripe marked this pull request as ready for review May 9, 2022 18:24
@charliecruzan-stripe charliecruzan-stripe merged commit e0e651d into master May 9, 2022
@charliecruzan-stripe charliecruzan-stripe deleted the charliecruzan-paymentlauncher-forward-results branch May 9, 2022 18:39
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

Successfully merging this pull request may close these issues.

2 participants