mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Rename default to primary
This commit is contained in:
@@ -126,7 +126,7 @@ class PiggyBankFactory
|
||||
private function getCurrency(array $data): TransactionCurrency
|
||||
{
|
||||
// currency:
|
||||
$defaultCurrency = app('amount')->getPrimaryCurrency();
|
||||
$primaryCurrency = app('amount')->getPrimaryCurrency();
|
||||
$currency = null;
|
||||
if (array_key_exists('transaction_currency_code', $data)) {
|
||||
$currency = $this->currencyRepository->findByCode((string)($data['transaction_currency_code'] ?? ''));
|
||||
@@ -134,7 +134,7 @@ class PiggyBankFactory
|
||||
if (array_key_exists('transaction_currency_id', $data)) {
|
||||
$currency = $this->currencyRepository->find((int)($data['transaction_currency_id'] ?? 0));
|
||||
}
|
||||
$currency ??= $defaultCurrency;
|
||||
$currency ??= $primaryCurrency;
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
Reference in New Issue
Block a user