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

feat: purchase subscriptions #4

Merged
merged 2 commits into from
Jul 26, 2024
Merged

feat: purchase subscriptions #4

merged 2 commits into from
Jul 26, 2024

Conversation

hyochan
Copy link
Owner

@hyochan hyochan commented Jul 26, 2024

Tested on iOS and Android.

@hyochan hyochan added the 🍗 enhancement New feature or request label Jul 26, 2024
Copy link

Risk Level 2 - /home/runner/work/expo-iap/expo-iap/src/index.ts

The changes in this file are mostly related to adding new types and handling subscription requests. Ensure that the requestSubscription function correctly handles the new replacementModeAndroid and purchaseTokenAndroid properties. Additionally, the console.log statement in the requestSubscription function should be removed or replaced with a proper logging mechanism before deploying to production.


Risk Level 2 - /home/runner/work/expo-iap/expo-iap/android/src/main/java/expo/modules/iap/ExpoIapModule.kt

The changes in this file are mostly related to error handling and promise rejection. The added lines are correctly handling errors and providing detailed messages. However, ensure that the error messages are consistent and informative. For example, in the queryProductDetailsAsync function, the error message could be more descriptive. Consider adding more context to the error messages to help with debugging.


Risk Level 3 - /home/runner/work/expo-iap/expo-iap/example/App.tsx

  1. The handleOperation function has been updated to include more operations. Ensure that the initConnection and endConnection operations are correctly setting the state. For example, setIsConnected(false) should be called after endConnection to ensure the state is updated correctly.
  2. The useEffect hook now includes a purchaseErrorListener. Ensure that the InteractionManager.runAfterInteractions is correctly handling the error alerts. Consider adding more detailed error messages to help with debugging.
  3. The rendering logic for products and subscriptions has been updated. Ensure that the key prop for the View components is unique and correctly identifies each item. For example, use item.id instead of item.title for the key prop.

🔍🛠️🚀


Powered by Code Review GPT

@hyochan hyochan merged commit 1bdfaed into main Jul 26, 2024
3 checks passed
@hyochan hyochan deleted the feat/subscriptions branch July 26, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍗 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant