fix: don't divide zero decimal currencies

This commit is contained in:
Sebastian Rindom
2021-03-22 11:00:56 +01:00
parent cfab2d408a
commit 3258955b46
@@ -55,7 +55,9 @@ class SegmentService extends BaseService {
return data.rates[fromCurrency] return data.rates[fromCurrency]
}) })
return this.totalsService_.rounded(value / exchangeRate) // Two decimal places
const num = value / exchangeRate
return Number(Math.round(num + "e2") + "e-2")
} }
async buildOrder(order) { async buildOrder(order) {