Skip to content

Firefly III: a personal finances manager

Turns out open exchange rates is useless.

James Cole605a71841897
diff --git a/.env.example b/.env.example
index eaa69b5d82..9a28c9f373 100755
--- a/.env.example
+++ b/.env.example
@@ -41,6 +41,8 @@ SHOW_INCOMPLETE_TRANSLATIONS=false
CACHE_PREFIX=firefly
+EXCHANGE_RATE_SERVICE=fixerio
+
GOOGLE_MAPS_API_KEY=
ANALYTICS_ID=
diff --git a/app/Http/Controllers/Json/ExchangeController.php b/app/Http/Controllers/Json/ExchangeController.php
index b37f5e392c..082b476ee4 100644
--- a/app/Http/Controllers/Json/ExchangeController.php
+++ b/app/Http/Controllers/Json/ExchangeController.php
@@ -32,6 +32,8 @@ class ExchangeController extends Controller
* @param TransactionCurrency $fromCurrency
* @param TransactionCurrency $toCurrency
* @param Carbon $date
+ *
+ * @return \Illuminate\Http\JsonResponse
*/
public function getRate(Request $request, TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date)
{
@@ -51,7 +53,7 @@ class ExchangeController extends Controller
$return['amount'] = null;
if (!is_null($request->get('amount'))) {
// assume amount is in "from" currency:
- $return['amount'] = bcmul($request->get('amount'), $rate->rate);
+ $return['amount'] = bcmul($request->get('amount'), strval($rate->rate));
}
return Response::json($return);
diff --git a/config/firefly.php b/config/firefly.php
index 879c45e0ee..9e02292848 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -211,7 +211,6 @@ return [
// tag notes has_attachments
'currency_exchange_services' => [
'fixerio' => 'FireflyIII\Services\Currency\FixerIO',
- 'openexchangerates' => 'FireflyIII\Services\Currency\OpenExchangeRates',
],
'preferred_exchange_service' => 'fixerio',