-
Notifications
You must be signed in to change notification settings - Fork 373
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
chore: Remove react-native-purchases-ui dependency #6665
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThe changes adjust project configuration and payment handling. The Xcode project now omits the RevenueCat UI bundle from build resources and adds a new ServiceExtension target with specific configurations. The dependency on Changes
Sequence Diagram(s)sequenceDiagram
participant U as User/Application
participant H as usePrimePayment Hook
participant P as Purchases API
U->>H: Invoke presentPaywallNative
H->>P: Call purchasePackage (select yearly offering)
P-->>H: Return purchase success
H-->>U: Return true
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (2)
apps/mobile/ios/Podfile.lock
is excluded by!**/*.lock
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (5)
apps/mobile/ios/OneKeyWallet.xcodeproj/project.pbxproj
(0 hunks)apps/mobile/package.json
(0 hunks)packages/kit/src/views/Prime/hooks/usePrimePayment.native.ts
(2 hunks)packages/kit/src/views/Prime/hooks/usePrimePayment.ts
(1 hunks)packages/kit/src/views/Prime/hooks/usePrimePaymentTypes.ts
(1 hunks)
💤 Files with no reviewable changes (2)
- apps/mobile/package.json
- apps/mobile/ios/OneKeyWallet.xcodeproj/project.pbxproj
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: lint (20.x)
- GitHub Check: unittest (20.x)
- GitHub Check: Socket Security: Pull Request Alerts
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
packages/kit/src/views/Prime/hooks/usePrimePayment.native.ts (2)
26-26
: Unused state variable removed.We no longer capture the first return value from
usePrimePersistAtom()
. This cleanup is good if the variable is not needed anymore. Please confirm that the removed state part is no longer used anywhere.
158-167
: Check if 'Yearly' offering exists before purchase.Calling
offerings.all.Yearly.availablePackages[0]
can throw if 'Yearly' is missing. Add a defensive check to avoid runtime errors. For instance:const offerings = await Purchases.getOfferings(); +if (!offerings.all.Yearly || offerings.all.Yearly.availablePackages.length === 0) { + throw new Error("No 'Yearly' offering found."); +} const { customerInfo } = await Purchases.purchasePackage( offerings.all.Yearly.availablePackages[0], );packages/kit/src/views/Prime/hooks/usePrimePayment.ts (1)
32-32
: Proper tweak if you don’t need the old state.We only track the setter now. That’s fine. Make sure you remove any leftover code that depended on the original state value if any remain.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@polkadot/[email protected], npm/@polkadot/[email protected] |
Summary by CodeRabbit
New Features
Chores
Refactor