Ignored/Allowed changes

This commit is contained in:
HojouFotytu 2021-03-29 01:46:33 +09:00
parent ace96a632b
commit 46ce12bd48
1 changed files with 2 additions and 2 deletions

View File

@ -1526,7 +1526,7 @@ namespace Core.Main
// Check allowed markets
List<string> allowedMarkets = SystemHelper.ConvertTokenStringToList(marketSetting.AllowedMarkets, ",");
if (allowedMarkets.Count > 0 && !allowedMarkets.Any(marketPair.Contains))
if (allowedMarkets.Count > 0 && !allowedMarkets.Any(am => marketPair.StartsWith(am, StringComparison.InvariantCultureIgnoreCase)))
{
this.Log.DoLogDebug("'" + marketPair + "' - Is not allowed in '" + marketSetting.SettingName + "'.");
continue;
@ -1534,7 +1534,7 @@ namespace Core.Main
// Check ignore global settings
List<string> ignoredGlobalSettings = SystemHelper.ConvertTokenStringToList(marketSetting.IgnoredGlobalSettings, ",");
if (ignoredGlobalSettings.Contains(this.ActiveSettingName))
if (ignoredMarkets.Any(im => marketPair.StartsWith(im, StringComparison.InvariantCultureIgnoreCase)))
{
this.Log.DoLogDebug("'" + marketPair + "' - '" + this.ActiveSettingName + "' - Is ignored in '" + marketSetting.SettingName + "'.");
continue;