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

Register more than one purchaseUpdatedListener cause all listeners to be called more than one time #2911

Open
JameDodgers opened this issue Jan 13, 2025 · 0 comments

Comments

@JameDodgers
Copy link

Description

In the project I work on, we have a purchaseUpdatedListener at the screen level and another at the global level. So, we started noticing that sometimes our backend receives multiple calls fired by the listener after our users tried to purchase a consumable product. Doing some testing, I noticed that after the first purchase, each purchase attempt increases the number of times the purchaseUpdatedListener is called. It seems that removing one of the listeners (the one for the screen) solved the problem. I believe maybe this was reported before in #2171.

Expected Behavior

Each purchaseUpdatedListener registered should be called just one time

Environment:

  • react-native-iap: 12.15.7
  • react-native: 0.76.5
  • Platforms (iOS, Android, emulator, simulator, device): Android emulator (didn't test on other platforms)
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