mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Turns out open exchange rates is useless.
This commit is contained in:
parent
994542c75d
commit
605a718418
@ -41,6 +41,8 @@ SHOW_INCOMPLETE_TRANSLATIONS=false
|
|||||||
|
|
||||||
CACHE_PREFIX=firefly
|
CACHE_PREFIX=firefly
|
||||||
|
|
||||||
|
EXCHANGE_RATE_SERVICE=fixerio
|
||||||
|
|
||||||
GOOGLE_MAPS_API_KEY=
|
GOOGLE_MAPS_API_KEY=
|
||||||
ANALYTICS_ID=
|
ANALYTICS_ID=
|
||||||
SITE_OWNER=mail@example.com
|
SITE_OWNER=mail@example.com
|
||||||
|
@ -32,6 +32,8 @@ class ExchangeController extends Controller
|
|||||||
* @param TransactionCurrency $fromCurrency
|
* @param TransactionCurrency $fromCurrency
|
||||||
* @param TransactionCurrency $toCurrency
|
* @param TransactionCurrency $toCurrency
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function getRate(Request $request, TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date)
|
public function getRate(Request $request, TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date)
|
||||||
{
|
{
|
||||||
@ -51,7 +53,7 @@ class ExchangeController extends Controller
|
|||||||
$return['amount'] = null;
|
$return['amount'] = null;
|
||||||
if (!is_null($request->get('amount'))) {
|
if (!is_null($request->get('amount'))) {
|
||||||
// assume amount is in "from" currency:
|
// 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);
|
return Response::json($return);
|
||||||
|
@ -211,7 +211,6 @@ return [
|
|||||||
// tag notes has_attachments
|
// tag notes has_attachments
|
||||||
'currency_exchange_services' => [
|
'currency_exchange_services' => [
|
||||||
'fixerio' => 'FireflyIII\Services\Currency\FixerIO',
|
'fixerio' => 'FireflyIII\Services\Currency\FixerIO',
|
||||||
'openexchangerates' => 'FireflyIII\Services\Currency\OpenExchangeRates',
|
|
||||||
],
|
],
|
||||||
'preferred_exchange_service' => 'fixerio',
|
'preferred_exchange_service' => 'fixerio',
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user