diff --git a/MultiMiner.WhatToMine/Extensions/CoinInformationExtensions.cs b/MultiMiner.WhatToMine/Extensions/CoinInformationExtensions.cs index da72cb75a..3cacd10d7 100644 --- a/MultiMiner.WhatToMine/Extensions/CoinInformationExtensions.cs +++ b/MultiMiner.WhatToMine/Extensions/CoinInformationExtensions.cs @@ -9,7 +9,7 @@ static class CoinInformationExtensions { public static void PopulateFromJson(this CoinInformation coinInformation, Data.ApiCoinInformation apiCoinInformation) { - coinInformation.Symbol = apiCoinInformation.Tag; + coinInformation.Symbol = FixSymbolName(apiCoinInformation.Tag, apiCoinInformation.Algorithm); coinInformation.Algorithm = FixAlgorithmName(apiCoinInformation.Algorithm); coinInformation.CurrentBlocks = apiCoinInformation.Last_Block; coinInformation.Difficulty = apiCoinInformation.Difficulty; @@ -26,11 +26,25 @@ public static void PopulateFromJson(this CoinInformation coinInformation, Data.A coinInformation.Price = apiCoinInformation.Exchange_Rate; } + private static string FixSymbolName(string symbol, string algorithm) + { + string result = symbol; + + if ("NICEHASH".Equals(result)) + { + result = "NiceHash:" + algorithm.Replace(AlgorithmFullNames.SHA256, AlgorithmNames.SHA256); + } + + return result; + } + private static string FixAlgorithmName(string algorithm) { string result = algorithm; if (algorithm.Equals(ApiContext.ScryptNFactor, StringComparison.OrdinalIgnoreCase)) + { result = AlgorithmFullNames.ScryptN; + } else { KnownAlgorithm knownAlgorithm = KnownAlgorithms.Algorithms.SingleOrDefault(a => a.Name.Equals(algorithm, StringComparison.OrdinalIgnoreCase));