elucidsoft / dotnetstandard-bip39

BIP39 Implementation in .NET Standard 2.0
Apache License 2.0
13 stars 5 forks source link

Invalid mnemonic on linux #1

Open Atomosk opened 3 years ago

Atomosk commented 3 years ago

It seems that the nuget package was compiled on windows platform with \r\n line endings. Environment.NewLine is \n on linux. Therefore this line https://github.com/elucidsoft/dotnetstandard-bip39/blob/master/dotnetstandard-bip39/BIP39.cs#L233 Produces the { "abandon\r", "ability\r", "able\r", "about\r" ... } array and line https://github.com/elucidsoft/dotnetstandard-bip39/blob/master/dotnetstandard-bip39/BIP39.cs#L62 fails to find anything.

darkfriend77 commented 2 years ago

https://github.com/elucidsoft/dotnetstandard-bip39/pull/2

Should fix the issue, would be nice to have a new nuget published :-)