Skip to content

Commit

Permalink
Release 4.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Oct 14, 2019
1 parent 2c432af commit cda2db8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Changelogs

- **[4.0.7]**
- Correctly fix `andDangerouslyFinishTransactionAutomatically` default to `true`.
- **[4.0.5]**
- Resolve [#788](https://github.com/dooboolab/react-native-iap/issues/788)
- **[4.0.4]**
Expand Down
14 changes: 10 additions & 4 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,18 @@ export const requestPurchase = (
ios: async () => {
andDangerouslyFinishTransactionAutomaticallyIOS =
andDangerouslyFinishTransactionAutomaticallyIOS === undefined
? false
? true
: andDangerouslyFinishTransactionAutomaticallyIOS;
if (andDangerouslyFinishTransactionAutomaticallyIOS) {
console.warn(
'You are dangerously allowing react-native-iap to finish your transaction automatically. You should set andDangerouslyFinishTransactionAutomatically to false when calling requestPurchase and call finishTransaction manually when you have delivered the purchased goods to the user. It defaults to true to provide backwards compatibility. Will default to false in version 4.0.0.',
);
}
checkNativeiOSAvailable();
return RNIapIos.buyProduct(sku, andDangerouslyFinishTransactionAutomaticallyIOS);
return RNIapIos.buyProduct(
sku,
andDangerouslyFinishTransactionAutomaticallyIOS,
);
},
android: async () => {
checkNativeAndroidAvailable();
Expand Down Expand Up @@ -328,15 +331,18 @@ export const requestSubscription = (
ios: async () => {
andDangerouslyFinishTransactionAutomaticallyIOS =
andDangerouslyFinishTransactionAutomaticallyIOS === undefined
? false
? true
: andDangerouslyFinishTransactionAutomaticallyIOS;
if (andDangerouslyFinishTransactionAutomaticallyIOS) {
console.warn(
'You are dangerously allowing react-native-iap to finish your transaction automatically. You should set andDangerouslyFinishTransactionAutomatically to false when calling requestPurchase and call finishTransaction manually when you have delivered the purchased goods to the user. It defaults to true to provide backwards compatibility. Will default to false in version 4.0.0.',
);
}
checkNativeiOSAvailable();
return RNIapIos.buyProduct(sku, andDangerouslyFinishTransactionAutomaticallyIOS);
return RNIapIos.buyProduct(
sku,
andDangerouslyFinishTransactionAutomaticallyIOS,
);
},
android: async () => {
checkNativeAndroidAvailable();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-iap",
"version": "4.0.5",
"version": "4.0.7",
"description": "React Native In App Purchase Module.",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit cda2db8

Please sign in to comment.