firoorg / firo-client

MIT License
19 stars 13 forks source link

Calculation of automated mints is incorrect #121

Closed reubenyap closed 4 years ago

reubenyap commented 4 years ago

In Settings, when you turn the Private/Public bar to full private, it seems to always round down the mint to the nearest 1 xzc.

So for example if I have 2.9873822 and showing 2.98 available to anonymize it will round down the automated minting to 2 x Mint 1 only.

On the other hand, when I click on Anonymize and enter in Choose Mints automatically, the behaviour is inconsistent sometimes giving more and sometimes less.

Assuming again I have 2.9873822 available coins to mint, when I enter in 2.95, it will try to mint 2.95 + 0.008 fees for a total of 2.958 (which is more than the amount stated). However, if I enter in 2.9, it will try to mint 2.8 coins + 0.007 fees for a total of 2.857 (which is lesser than the amount stated).