diff --git a/src/CurrencyConverter.php b/src/CurrencyConverter.php index a90e3be..31fdb5e 100644 --- a/src/CurrencyConverter.php +++ b/src/CurrencyConverter.php @@ -57,7 +57,7 @@ public function convert($fromAmount, $fromCurrency, $toCurrency, \DateTime $pubD $toMultiplier = str_replace(',', '.', $rates['waluty'][$toCurrency]['przelicznik']); $toAverageRate = str_replace(',', '.', $rates['waluty'][$toCurrency]['kurs_sredni']); - bcscale(6); + bcscale(20); $plnAmount = bcdiv(bcmul($fromAmount, $fromAverageRate), $fromMultiplier); $resultAmount = bcdiv(bcmul($plnAmount, $toMultiplier), $toAverageRate); $roundedResult = BCMathHelper::bcround($resultAmount, 4);