zpbappi / money

A Money class written in C# for handling multi-currency arithmetic with generic type support.
MIT License
47 stars 9 forks source link

Need support for CryptoCurrencies #12

Open BillHertzing opened 6 years ago

BillHertzing commented 6 years ago

I'd like to use Money and Wallet to represent/hold any CryptoCurrency as well any ISO 4217 fiat money. The current implementation supports the ISO 4217 CurrencyCode enumeration, but this standard does not mention the 1000+ new cryptocurrencies that are being quickly introduced. One source that can be used to create an enumeration of cryptocurrencies is in this GitHub repository: crypti/cryptocurrencies ([https://github.com/crypti/cryptocurrencies]). These are just strings.

If this feature were added, then Wallet would be useful in the CryptoCurrency domain in addition to the fiat currency domain. Please modify the class and methods to support on either the 4217 enumeration, or an enumeration created from the JSON class above, or both.

zpbappi commented 6 years ago

@BillHertzing Excellent idea. However, the number of cryptos are growing very frequently. And, I really want to move away from string-based currency name yet provide support for all cryptocurrencies currently available and will be available in future. Having a large enough enum is not really a solution for it, as it will become outdated with the arrival of a new crypto. This is possible if I decide to change the way I treat currency in the code- which is a large change. I may do this at some point in near future. Please do share if you have different thoughts.

zpbappi commented 6 years ago

@BillHertzing I did come up with an idea to support not only crypto-currencies, but also commodities. so, basically, you will be able to use the Money class for anything along with fiat currencies like USD, AUD, etc. Needless to say, you can also mix and match them together. This will be a breaking change and will be released as a major version in near future. Keep an I on the repo and/or nuget package. I will also update the project to support .NET Standard 2.0 in that release.

BillHertzing commented 6 years ago

Sounds good, I'll give it a shot when I get the chance, after I see it get released.

On Mon, Aug 6, 2018 at 11:51 PM Zp Bappi notifications@github.com wrote:

@BillHertzing https://github.com/BillHertzing I did come up with an idea to support not only crypto-currencies, but also commodities. so, basically, you will be able to use the Money class for anything along with fiat currencies like USD, AUD, etc. Needless to say, you can also mix and match them together. This will be a breaking change and will be released as a major version in near future. Keep an I on the repo and/or nuget package. I will also update the project to support .NET Standard 2.0 in that release.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zpbappi/money/issues/12#issuecomment-410924729, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2mtAYVtuRIO7IGUffT07XZ0DPFu13Uks5uOQ63gaJpZM4QdwTy .