Registered RNIap.purchaseUpdatedListener is being called before RNIap.requestPurchase resovles. #1671
Unanswered
grubstarstar
asked this question in
Q&A
Replies: 0 comments
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Expected Behaviour
The promise for
RNIap.requestPurchase(productId, false)
returns before the event handler registered atRNIap.purchaseUpdatedListener()
starts executionI need this because I am relying on the result of the resolved promise to keep track of feature parameters that I want to associate with the transaction when the purchaseUpdatedListener is called.
Actual behaviour
The purchaseUpdatedListener handler starts execution before RNIap.requestPurchase(productId, false) has returned meaning the getSavedFeatureParamsForTransactionID() function will be called before the featureParams have been saved in saveFeatureParamForTransactionID() meaning the feature params are not retrieved.
Beta Was this translation helpful? Give feedback.
All reactions