RevenueCat / purchases-ios

In-app purchases and subscriptions made easy. Support for iOS, watchOS, tvOS, macOS, and visionOS.
https://www.revenuecat.com/
MIT License
2.22k stars 295 forks source link

Return any cached CustomerInfo if we dont have an AppTransaction #4021

Closed MarkVillacampa closed 5 days ago

MarkVillacampa commented 1 week ago

To avoid making a request to /receipt without any transaction or app_transaction, return a cached customer info object if we don't have an app_transaction, even if the originalAppVersion and originalPurchaseDate are empty.

Checklist

Motivation

Description

RevenueCat-Danger-Bot commented 1 week ago
1 Error
:no_entry_sign: Label the PR using one of the change type labels
Label Description
breaking Changes that are breaking
build Changes that affect the build system
ci Changes to our CI configuration files and scripts
docs Documentation only changes
feat A new feature
fix A bug fix
perf A code change that improves performance
RevenueCatUI A change to the RevenueCatUI library
refactor A code change that neither fixes a bug nor adds a feature
style Changes that don't affect the meaning of the code (white-space, formatting, missing semi-colons, etc
test Adding missing tests or correcting existing tests
next_release Preparing a new release
dependencies Updating a dependency
phc_dependencies Updating purchases-hybrid-common dependency

Generated by :no_entry_sign: Danger

aboedo commented 5 days ago

had conversation about this offline, we want to retain the ability for the backend to get information about how often this happens and the patterns in production, so we want to remove the early return.

Closing this for now.