spark-wallet icon indicating copy to clipboard operation
spark-wallet copied to clipboard

Option to configure/disable exchange rate polling

Open Desuuuu opened this issue 6 years ago • 5 comments

I feel like a startup option to configure/disable exchange rate polling would be useful.

Desuuuu avatar Sep 04 '18 19:09 Desuuuu

I can see why users would want to change the poll interval, but why would they want to disable it?

If we do add a way to disable rate polling entirely, this should also make the "usd" option disappear from the UI.

shesek avatar Sep 04 '18 20:09 shesek

People who do not need the rates or do not want to contact Bitstamp might want to disable it.

As far as the UI goes, I guess the change boils down to adding some logic that prevents toggling the unit to USD when the btcusd rate is not available. I had a look at the code to see how I would go about this, but I must say the code was a bit too intricate for me to figure it out right now.

Desuuuu avatar Sep 04 '18 21:09 Desuuuu

I'll look into implementing this. This will require some refactoring in the way currency units are handled, so might take me a little while to get to it.

shesek avatar Sep 04 '18 21:09 shesek

On a side note, I think you would appeal to more contributors if the codebase was easier for someone to get his hands on.

For example from what I've seen, the code contains a lot of inline arrow functions (sometimes quite complex), which saves a few lines of code, but really hinders readability.

Desuuuu avatar Sep 04 '18 22:09 Desuuuu

Thanks, I'll look into improving readability. But note that other than the terse style, the usage of stream-based reactive programming also creates a non-negligible barrier to entry, as its not a very common programming style. I think that programmers experienced with this style would find the terse code easier to parse.

shesek avatar Sep 04 '18 22:09 shesek