Clean up code.

This commit is contained in:
James Cole
2023-12-10 06:45:59 +01:00
parent 9a807fc215
commit c2b22a2bac
157 changed files with 648 additions and 669 deletions

View File

@@ -171,7 +171,7 @@ trait ConvertsExchangeRates
private function convertAmount(string $amount, TransactionCurrency $from, TransactionCurrency $to, ?Carbon $date = null): string
{
app('log')->debug(sprintf('Converting %s from %s to %s', $amount, $from->code, $to->code));
$date = $date ?? today(config('app.timezone'));
$date ??= today(config('app.timezone'));
$rate = $this->getRate($from, $to, $date);
return bcmul($amount, $rate);