Skip to content

Commit

Permalink
(fix): Error with lowercurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
chapdel committed Dec 9, 2021
1 parent faedbf4 commit ca67131
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ public function __construct(array $config, FactoryContract $cache)
public function convert($amount, $from = null, $to = null, $format = true)
{
// Get currencies involved
$from = $from ?: $this->config('default');
$to = $to ?: $this->getUserCurrency();

$from = strtoupper($from ?: $this->config('default'));
$to = strtoupper($to ?: $this->getUserCurrency());
// Get exchange rates
$from_rate = $this->getCurrencyProp($from, 'exchange_rate');
$to_rate = $this->getCurrencyProp($to, 'exchange_rate');
Expand Down

0 comments on commit ca67131

Please sign in to comment.