Skip to content

Commit

Permalink
fix(dashspend): allow null value for savingsPercentage
Browse files Browse the repository at this point in the history
  • Loading branch information
HashEngineering committed Aug 5, 2024
1 parent 78a41e0 commit f262d85
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ data class Merchant(
var redeemType: String? = "",
@Ignore var minCardPurchase: Double? = null,
@Ignore var maxCardPurchase: Double? = null,
var savingsPercentage: Int = 0,
var savingsPercentage: Int? = 0,
@Ignore var physicalAmount: Int = 0
) : SearchResult() {

// 1% discount is 0.01
val savingsPercentageAsDouble: Double
get() = savingsPercentage.toDouble() / 10000
get() = (savingsPercentage?.toDouble() ?: 0.0) / 10000
}

0 comments on commit f262d85

Please sign in to comment.