Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for all currencies #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cathaloc
Copy link

Closes #3

Adds support for currencies other than USD and EUR by using USD as an intermediary currency.

For example, if CAD is selected, the exchange rate will be calculated by multiplying the BTC->USD rate by the USD->CAD rate.

I've tested the result against my own account (currently have a balance of ~ CAD$70, and I can confirm that the amount reported in Home Assistant matches what's reported in the NiceHash UI, to the cent. So it's likely that NiceHash is using the exact same formula.

One downside of my implementation is that the USD currency icon will be used for all non-EUR currencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

alternative currencies were previously supported... weren't they?
1 participant