Rename references to native amounts

This commit is contained in:
James Cole
2025-07-31 20:55:30 +02:00
parent da36d84b79
commit ea6addafe6
16 changed files with 60 additions and 61 deletions

View File

@@ -44,10 +44,10 @@ class AccountObserver
public function created(Account $account): void
{
// Log::debug('Observe "created" of an account.');
$this->updateNativeAmount($account);
$this->updatePrimaryCurrencyAmount($account);
}
private function updateNativeAmount(Account $account): void
private function updatePrimaryCurrencyAmount(Account $account): void
{
if (!Amount::convertToPrimary($account->user)) {
return;
@@ -67,7 +67,7 @@ class AccountObserver
$account->native_virtual_balance = null;
}
$account->saveQuietly();
// Log::debug('Account native virtual balance is updated.');
// Log::debug('Account primary currency virtual balance is updated.');
}
/**
@@ -108,6 +108,6 @@ class AccountObserver
public function updated(Account $account): void
{
// Log::debug('Observe "updated" of an account.');
$this->updateNativeAmount($account);
$this->updatePrimaryCurrencyAmount($account);
}
}