Skip to content

Commit

Permalink
refactor(app): return early
Browse files Browse the repository at this point in the history
  • Loading branch information
hekike committed Jan 1, 2025
1 parent 25e5ec8 commit 083c43f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openmeter/app/stripe/entity/app/calculator.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ func (c StripeCalculator) FormatAmount(amount alpacadecimal.Decimal) string {
func (c StripeCalculator) FormatQuantity(quantity alpacadecimal.Decimal) string {
if quantity.IsInteger() {
return c.printer.Sprintf("%d", quantity.IntPart())
} else {
f, _ := quantity.Float64()
return c.printer.Sprintf("%.2f", f)
}

f, _ := quantity.Float64()
return c.printer.Sprintf("%.2f", f)
}

// IsInteger checks if the amount is an integer in the Stripe currency.
Expand Down

0 comments on commit 083c43f

Please sign in to comment.