veebch/btcticker

Toggle showing digits after comma not possible?

chriskalv opened this issue · 1 comments

Hi,

I've just redone my btcticker, as I needed the its RP Zero W for another project and instead installed the repo on a RP Zero 2 W. So far so good.

In the past, the ticker always showed ETH/USD as an integer, without digits after the comma. Now, it shows them. Is there any poyyibility of disabling them without diving into the code?

Thanks and best regards

veebch commented

Nothing with the current code. The inclusion of decimals is due to a threshold

If you're willing to get you hands dirty, this is the code that does it (around line 350 or so)

 if pricenow > 10000:
        # round to nearest whole unit of currency, this is an ugly hack for now
        pricestring = custom_format_currency(
            int(pricenow), fiatupper, localetag)

Change the threshold from 10000 to 100 and it will probably fix it.