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

NTV-381: Migrate KSCurrency to kotlin and deprecate autoparcel #1578

Merged
merged 9 commits into from
Mar 28, 2022

Conversation

leighdouglas
Copy link
Contributor

📲 What

  • Converted KSCurrency.java to kotlin
  • Decoupled CurrencyOptions parcelable from KSCurrency
  • Tests

🤔 Why

Deprecation of autoparcel library in an ongoing effort to migrate to android's in-house parcelize.

📋 QA

  • Test checkout flow and anywhere that a user can see currency

Story 📖

NTV-381: Migrate KSCurrency to kotlin and deprecate autoparcel
WEB-376: Migrate KSCurrency to kotlin and deprecate autoparcel

@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

Merging #1578 (7cdf828) into master (32b539b) will increase coverage by 0.05%.
The diff coverage is 94.68%.

@@             Coverage Diff              @@
##             master    #1578      +/-   ##
============================================
+ Coverage     76.66%   76.72%   +0.05%     
- Complexity     1600     1611      +11     
============================================
  Files           355      356       +1     
  Lines         14882    14918      +36     
  Branches       1675     1680       +5     
============================================
+ Hits          11410    11446      +36     
+ Misses         2583     2580       -3     
- Partials        889      892       +3     
Impacted Files Coverage Δ
...p/src/main/java/com/kickstarter/libs/KSCurrency.kt 92.59% <92.59%> (ø)
.../main/java/com/kickstarter/libs/CurrencyOptions.kt 97.50% <97.50%> (ø)
...main/java/com/kickstarter/models/ErroredBacking.kt 86.53% <0.00%> (-1.93%) ⬇️
...c/main/java/com/kickstarter/libs/models/Country.kt 100.00% <0.00%> (+5.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32b539b...7cdf828. Read the comment docs.

* @param initialValue Value to convert, local to the project's currency.
* @param roundingMode When this is DOWN, we get the floor of the initialValue.
*/
private fun getRoundedValue(initialValue: Double, roundingMode: RoundingMode): Float {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method can be private to KSCurrency class, no need for it to be wrapped on a companion object

@leighdouglas leighdouglas force-pushed the leigh/ntv-381-kscurrency-parcelize branch from d36198f to 9f3dd90 Compare March 25, 2022 15:44
Copy link
Contributor

@Arkariang Arkariang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@leighdouglas leighdouglas merged commit db0be1d into master Mar 28, 2022
@leighdouglas leighdouglas deleted the leigh/ntv-381-kscurrency-parcelize branch March 28, 2022 17:36
Arkariang added a commit that referenced this pull request Apr 6, 2022
…e/NTV-411-integrate-payment-sheet

* 'master' of github.com:kickstarter/android-oss: (22 commits)
  NTV-476 :Migrate AccessTokenEnvelope.java to kotlin and deprecate Autoparcel (#1592)
  NTV-474 :Migrate SignupBody.java to kotlin and deprecate Autoparcel (#1591)
  NTV-472 : Migrate ResetPasswordBody.java to kotlin and deprecate Autoparcel (#1590)
  NTV-436: Migrate Reftag.java to kotlin and deprecate Autoparcel (#1589)
  NTV-471 : Migrate RegisterWithFacebookBody.java to kotlin and deprecate Autoparcel (#1588)
  NTV-468 :Migrate CheckoutData.java to kotlin and deprecate Autoparcel (#1586)
  NTV-443 : Migrate LoginWithFacebookBody.java to kotlin and deprecate Autoparcel (#1585)
  NTV-465: Add audio parsing (#1584)
  NTV-437:Migrate RelativeDateTimeOptions to Kotlin and deprecate Autoparcel (#1580)
  NTV-438: Deprecate autoparcel for checkout (#1583)
  NTV-381: Migrate KSCurrency to kotlin and deprecate autoparcel (#1578)
  NTV-463: Crash during regression (#1582)
  [no-jira]: update dependencies (#1579)
  NTV-445 : Migrate ProjectNotificationBody.java to kotlin and deprecate Autoparcel (#1581)
  NTV-441  : Migrat Video.java to kotlin and deprecate Autoparcel (#1577)
  NTV-434 :Deprecate Autoparcel for ShippingRule.kt (#1576)
  NTV-456: Ktlint integration update (#1575)
  NTV-440 : Deprecate Autoparcel for ErroredBacking.kt (#1569)
  NTV-444 :Migrate MessageBody.java to kotlin and deprecate Autoparcel (#1570)
  Migrate CreatorDetails.java to kotlin and deprecate Autoparcel (#1571)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants