fix: don't divide zero decimal currencies
This commit is contained in:
1 parent
cfab2d408a
commit
3258955b46
1 file changed
+3
-1
@@ -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) {
|
||||||
|
|||||||
Reference in new issue
Block a user