Rename default to primary

This commit is contained in:
Sander Dorigo
2025-08-01 13:48:32 +02:00
parent 37d45f4f87
commit 87567d5a31
24 changed files with 62 additions and 62 deletions

View File

@@ -224,9 +224,9 @@ trait TransactionValidation
/** @var AccountRepository $accountRepository */
$accountRepository = app(AccountRepositoryInterface::class);
$defaultCurrency = app('amount')->getPrimaryCurrency();
$sourceCurrency = $accountRepository->getAccountCurrency($source) ?? $defaultCurrency;
$destinationCurrency = $accountRepository->getAccountCurrency($destination) ?? $defaultCurrency;
$primaryCurrency = app('amount')->getPrimaryCurrency();
$sourceCurrency = $accountRepository->getAccountCurrency($source) ?? $primaryCurrency;
$destinationCurrency = $accountRepository->getAccountCurrency($destination) ?? $primaryCurrency;
// if both accounts have the same currency, continue.
if ($sourceCurrency->code === $destinationCurrency->code) {
Log::debug('Both accounts have the same currency, continue.');