[MON-1122] Revert variable rounding logic to not round up#2857
Merged
polpielladev merged 13 commits intoNov 21, 2025
Conversation
Updated the PriceFactory to ensure that the formatted price reflects the correct number of decimal places by truncating the value before formatting. This change improves the accuracy of currency representation in the application.
ece0b4b to
6fc45c3
Compare
📸 Snapshot Test119 modified, 451 unchanged
🛸 Powered by Emerge Tools |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2857 +/- ##
=======================================
Coverage 78.23% 78.24%
=======================================
Files 323 324 +1
Lines 12711 12715 +4
Branches 1736 1736
=======================================
+ Hits 9945 9949 +4
Misses 2036 2036
Partials 730 730 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tonidero
reviewed
Nov 20, 2025
tonidero
left a comment
Contributor
There was a problem hiding this comment.
I think we might just want to use round instead of floor to account for possible floating point errors. Other than that, it looks great!
tonidero
approved these changes
Nov 20, 2025
tonidero
left a comment
Contributor
There was a problem hiding this comment.
Looks great! Thanks for doing this 🙌
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Nov 25, 2025
**This is an automatic release.** > [!WARNING] > If you don't have any login system in your app, please make sure your one-time purchase products have been correctly configured in the RevenueCat dashboard as either consumable or non-consumable. If they're incorrectly configured as consumables, RevenueCat will consume these purchases. This means that users won't be able to restore them from version 9.0.0 onward. > Non-consumables are products that are meant to be bought only once, for example, lifetime subscriptions. ## RevenueCat SDK ### 🐞 Bugfixes * Restore Purchases config automatically in CustomerCenter (#2867) via Facundo Menzella (@facumenzella) * Handle error reading `errorStream` in some devices (#2865) via Toni Rico (@tonidero) * [MON-1122] Revert variable rounding logic to not round up (#2857) via Pol Piella Abadia (@polpielladev) ## RevenueCatUI SDK ### Paywallv2 #### 🐞 Bugfixes * Select default package on Sheet dismissal (#2861) via Cesar de la Vega (@vegaro) ### Customer Center #### ✨ New Features * CC-581 | Allow for support ticket creation (#2810) via Rosie Watson (@RosieWatson) ### 🔄 Other Changes * Bump fastlane-plugin-revenuecat_internal from `7328ea7` to `efca663` (#2864) via dependabot[bot] (@dependabot[bot]) * Bump fastlane from 2.228.0 to 2.229.0 (#2863) via dependabot[bot] (@dependabot[bot]) * Bump fastlane-plugin-revenuecat_internal from `083ced9` to `7328ea7` (#2862) via dependabot[bot] (@dependabot[bot]) * Runs plugin actions from correct directory (#2858) via JayShortway (@JayShortway) * Flush multiple event batches (#2842) via Toni Rico (@tonidero) * Add file size limit to events tracking files (#2841) via Toni Rico (@tonidero) * Make events manager be supported in Android < 24 (#2854) via Toni Rico (@tonidero) * Add non paid revenue reporting infra (#2728) via Toni Rico (@tonidero) * Fix backend integration tests (#2860) via Toni Rico (@tonidero) * Track `connection_error_reason` property in diagnostics (#2855) via Toni Rico (@tonidero) * Uses some git+GitHub lanes from Fastlane plugin (#2856) via JayShortway (@JayShortway) * Add client side timeout logic for endpoints that support fallback URLs (#2807) via Toni Rico (@tonidero) * [EXTERNAL] Fix deprecation warnings in examples module (#2852) contributed by @gojoel (#2853) via Toni Rico (@tonidero) * Bump fastlane-plugin-revenuecat_internal from `9f78bb9` to `083ced9` (#2848) via dependabot[bot] (@dependabot[bot]) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When shipping Paywalls v2, there was a regression with the way that we show prices. We changed from not rounding or rounding down to actually rounding up.
Where this is specially important is when a dev picks a price that is explicitly designed to get just under a dollar threshold, like $83.99, which is either 6.99 or 7.00 — and 6.99 is the actual price they're aiming to put in front of customers.
Checklist
purchases-iosand hybrids