Currency code expansion.

This commit is contained in:
James Cole
2021-05-13 05:52:06 +02:00
parent 53dffc961f
commit 3f1bd6b3f1
9 changed files with 139 additions and 107 deletions

View File

@@ -161,9 +161,6 @@ class Amount
$currencyCode = $this->tryDecrypt((string)$currencyPrefStr);
// could still be json encoded:
if (strlen($currencyCode) > 3) {
$currencyCode = json_decode($currencyCode, true, 512, JSON_THROW_ON_ERROR) ?? 'EUR';
}
/** @var TransactionCurrency|null $currency */
$currency = TransactionCurrency::where('code', $currencyCode)->first();
if (null === $currency) {