Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrumac committed Nov 6, 2024
1 parent 3235992 commit 4952d8b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion superwall/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
id("signing")
}

version = "1.4.0-beta.1"
version = "1.4.0-beta.2"

android {
compileSdk = 34
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ data class SubscriptionPeriod(
fun pricePerWeek(price: BigDecimal): BigDecimal {
val periodsPerWeek: BigDecimal =
when (this.unit) {
SubscriptionPeriod.Unit.day -> BigDecimal.ONE.divide(BigDecimal(7), 4, roundingMode)
SubscriptionPeriod.Unit.day -> BigDecimal.ONE.divide(BigDecimal(7), calculationScale, roundingMode)
SubscriptionPeriod.Unit.week -> BigDecimal.ONE
SubscriptionPeriod.Unit.month -> BigDecimal(4)
SubscriptionPeriod.Unit.year -> BigDecimal(52)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ fun truncateDecimal(
class SubscriptionPeriodUnitTest {
@Test
fun double_period_test() {
val period = "P4W2D"
val period = "P4W3D"
val res = SubscriptionPeriod.from(period)
println(res)
assert(res == SubscriptionPeriod(30, SubscriptionPeriod.Unit.day))
assert(res == SubscriptionPeriod(31, SubscriptionPeriod.Unit.day))
}
/* TODO: Re-enable these in CI
@Test
Expand Down

0 comments on commit 4952d8b

Please sign in to comment.