alfred2-currencyconverter icon indicating copy to clipboard operation
alfred2-currencyconverter copied to clipboard

Default "to" is not taken into account when a non-default "from" currency is used

Open durmaze opened this issue 8 years ago • 5 comments

Hi,

nice workflow!

after setting the default from and to currencies, when i tried to use a different currency for the "from", it didnt use the default "to" currency i set up. instead, it uses the USD.

may be it is by design, but i would expect to use the default "to" currency.

thanks

durmaze avatar Nov 02 '15 08:11 durmaze

In fact, it doesn't explicitly use USD, it uses your default from currency. I'm guessing you have your default to currency set to USD. :)

arvidbjorkstrom avatar Feb 26 '16 11:02 arvidbjorkstrom

I'm seeing this too. My "default to" is set to GBP but typing "currency AUD" shows me a conversion to USD.

dixhuit avatar Mar 14 '16 12:03 dixhuit

I guess the problem is caused from here: e4QueryParser.php#L129.

Changing it into the following will fix this issue:

$this->to = $this->from->isEqualOf($this->defaultTo) ? $this->defaultFrom : $this->defaultTo;

idiotWu avatar Jul 26 '16 19:07 idiotWu

It is fixing this issue. great! Thank you idiotWu.

Talzoor avatar Dec 16 '16 09:12 Talzoor

Cheers

jorgenbs avatar Feb 28 '17 14:02 jorgenbs