alfred-currency-conversion icon indicating copy to clipboard operation
alfred-currency-conversion copied to clipboard

can not add favorite currency list

Open simlegate opened this issue 2 years ago • 6 comments

It's correct to setup base currency. image But it seem to can not recognize this command curcon LIST. image Is there some wrong operation for me?

Node: v17.9.0 Alfred: 4.6.4 Powerpack alfred-currency-conversion: 0.2.0

simlegate avatar Apr 28 '22 03:04 simlegate

It seems that the new feature Set your own favorite currency list is not included in version 0.2.0. Is there deadline to release new version?

simlegate avatar Apr 28 '22 04:04 simlegate

Yes, when I install this it seems like the code is quite different from master. I don't get the favoriteCurrencies.

I hover made this change in the source:

const topCurrencies = process.env['CURRENCIES'] ?
  process.env['CURRENCIES'].split(',') :
  ["USD", "EUR", "JPY", "GBP", "CHF", "CAD", "AUD"];
const allCurrencies = ["AUD", "BGN", "BRL", "CAD", "CHF", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HRK", "HUF", "IDR", "ILS", "INR", "ISK", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PLN", "RON", "RUB", "SEK", "SGD", "THB", "TRY", "USD", "ZAR"];
const currencies = [...new Set([...topCurrencies, ...allCurrencies])];

And I set comma separated currencies in environment variables and that works for me. I guess I might lose this change on update but I don't mind that much.

MartinMalinda avatar Jul 01 '22 10:07 MartinMalinda

how can I paste it into the workflow?

lidoror avatar Jul 26 '22 07:07 lidoror

Screenshot 2022-07-26 at 9 31 03 Screenshot 2022-07-26 at 9 31 46

There you can find the source. Good luck!

MartinMalinda avatar Jul 26 '22 07:07 MartinMalinda

did you replaced all three variable for it to work?

lidoror avatar Jul 26 '22 07:07 lidoror

yes! I also set an environmenta variable

https://user-images.githubusercontent.com/9468793/180970315-a31fb71c-8e07-4b1a-9bdf-199705987c51.mov

MartinMalinda avatar Jul 26 '22 09:07 MartinMalinda