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: use the LocalBroadcastManager #588

Merged
merged 3 commits into from
Sep 16, 2021
Merged

Conversation

michelleb-stripe
Copy link
Contributor

No description provided.

this.currentActivity?.registerReceiver(googlePayReceiver, IntentFilter(ON_INIT_GOOGLE_PAY))
this.currentActivity?.registerReceiver(googlePayReceiver, IntentFilter(ON_GOOGLE_PAY_RESULT))
this.currentActivity?.registerReceiver(googlePayReceiver, IntentFilter(ON_GOOGLE_PAYMENT_METHOD_RESULT))
val localBroadcastManager = LocalBroadcastManager.getInstance(requireNotNull(this.currentActivity?.baseContext))
Copy link

@ruben-stripe ruben-stripe Sep 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use reactApplicationContext here instead of this.currentActivity?.baseContext? It is the context we are using before (Stripe & PaymentConfiguration) and we don't have the risk of this.currentActivity being null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it

@michelleb-stripe
Copy link
Contributor Author

@michelleb-stripe michelleb-stripe merged commit a0d5249 into master Sep 16, 2021
@michelleb-stripe michelleb-stripe deleted the michelleb/fix-events branch September 16, 2021 02:02
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.

3 participants