Skip to content

Commit

Permalink
fixed promise never returned from purchase() (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
ancyrweb authored and hyochan committed Oct 25, 2019
1 parent 6658d06 commit ada6e42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/src/main/java/com/dooboolab/RNIap/RNIapModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ public void onPurchasesUpdated(BillingResult billingResult, @Nullable List<Purch
item.putBoolean("isAcknowledgedAndroid", purchase.isAcknowledged());
item.putInt("purchaseStateAndroid", purchase.getPurchaseState());

promiseItem = item.copy();
sendEvent(reactContext, "purchase-updated", item);
promiseItem = item;
}
if (purchases.size() > 0 && promiseItem != null) {
DoobooUtils.getInstance().resolvePromisesForKey(PROMISE_BUY_ITEM, promiseItem);
Expand Down

0 comments on commit ada6e42

Please sign in to comment.