mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 02:03:40 +00:00
Create some new test code.
This commit is contained in:
@@ -301,9 +301,6 @@ class Amount
|
||||
*/
|
||||
public function getDefaultCurrencyByUser(User $user): TransactionCurrency
|
||||
{
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should NOT be called in the TEST environment!', __METHOD__));
|
||||
}
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty('getDefaultCurrency');
|
||||
$cache->addProperty($user->id);
|
||||
@@ -314,7 +311,7 @@ class Amount
|
||||
$currencyPrefStr = $currencyPreference ? $currencyPreference->data : 'EUR';
|
||||
|
||||
// at this point the currency preference could be encrypted, if coming from an old version.
|
||||
Log::debug('Going to try to decrypt users currency preference.');
|
||||
//Log::debug('Going to try to decrypt users currency preference.');
|
||||
$currencyCode = $this->tryDecrypt((string) $currencyPrefStr);
|
||||
|
||||
// could still be json encoded:
|
||||
@@ -354,7 +351,7 @@ class Amount
|
||||
try {
|
||||
$value = Crypt::decrypt($value); // verified
|
||||
} catch (DecryptException $e) {
|
||||
Log::debug(sprintf('Could not decrypt "%s". %s', $value, $e->getMessage()));
|
||||
//Log::debug(sprintf('Could not decrypt "%s". %s', $value, $e->getMessage()));
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
Reference in New Issue
Block a user