alfred2-currencyconverter
alfred2-currencyconverter copied to clipboard
Default "to" is not taken into account when a non-default "from" currency is used
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
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. :)
I'm seeing this too. My "default to" is set to GBP but typing "currency AUD" shows me a conversion to USD.
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;
It is fixing this issue. great! Thank you idiotWu.
Cheers