Make really sure we don't generate segwit addresses for non segwit coins

This commit is contained in:
nicolas.dorier 2018-11-17 01:39:32 +09:00
parent 85062725bd
commit 5b684ac26e
2 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<Version>1.0.3.12</Version>
<Version>1.0.3.13</Version>
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
</PropertyGroup>
<PropertyGroup>

View File

@ -69,7 +69,11 @@ namespace BTCPayServer
if (IsLabel(parts[i]))
{
if (!hasLabel)
{
hintedLabels.Clear();
if (!Network.Consensus.SupportSegwit)
hintedLabels.Add("legacy");
}
hasLabel = true;
hintedLabels.Add(parts[i].Substring(1, parts[i].Length - 2).ToLowerInvariant());
continue;