Skip to content

Commit 9fe16c3

Browse files
Bump Bitcoin.Net version (improves dealing with addresses)
1 parent 19a5a09 commit 9fe16c3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Src/FinderOuter/FinderOuter.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<None Remove="Views\MissingMnemonicView.xaml" />
5959
</ItemGroup>
6060
<ItemGroup>
61-
<PackageReference Include="Autarkysoft.Bitcoin" Version="0.13.0" />
61+
<PackageReference Include="Autarkysoft.Bitcoin" Version="0.14.0" />
6262
<PackageReference Include="Avalonia" Version="0.10.6" />
6363
<PackageReference Include="Avalonia.Desktop" Version="0.10.6" />
6464
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.6" />

Src/FinderOuter/Services/AddressService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ public bool Compare(string expectedAddr, InputType inType, PrivateKey prv, out s
6060
var pub = prv.ToPublicKey();
6161
if (inType == InputType.AddrNested)
6262
{
63-
if (expectedAddr == Address.GetP2sh_P2wpkh(pub, 0))
63+
if (expectedAddr == Address.GetP2sh_P2wpkh(pub))
6464
{
6565
message = "The given address is derived from the given private key.";
6666
}
67-
else if (expectedAddr == Address.GetP2sh_P2wpkh(pub, 0, false))
67+
else if (expectedAddr == Address.GetP2sh_P2wpkh(pub, false))
6868
{
6969
message = "The given address is derived from the given private key but it uses " +
7070
"uncompressed pubkey which is non-standard.";
@@ -79,11 +79,11 @@ public bool Compare(string expectedAddr, InputType inType, PrivateKey prv, out s
7979
{
8080
if (expectedAddr.StartsWith("bc"))
8181
{
82-
if (expectedAddr == Address.GetP2wpkh(pub, 0))
82+
if (expectedAddr == Address.GetP2wpkh(pub))
8383
{
8484
message = "The given address is derived from the given private key.";
8585
}
86-
else if (expectedAddr == Address.GetP2wpkh(pub, 0, false))
86+
else if (expectedAddr == Address.GetP2wpkh(pub, false))
8787
{
8888
message = "The given address is derived from the given private key but it uses " +
8989
"uncompressed pubkey which is non-standard.";

Src/FinderOuter/Services/Base58Sevice.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ private void WifLoopMissingEnd(bool compressed)
326326
string msg = $"Found the key: {tempWif}{Environment.NewLine}" +
327327
$" Compressed P2PKH address={Address.GetP2pkh(pub, true)}{Environment.NewLine}" +
328328
$" Uncompressed P2PKH address={Address.GetP2pkh(pub, false)}{Environment.NewLine}" +
329-
$" Compressed P2WPKH address={Address.GetP2wpkh(pub, 0)}{Environment.NewLine}" +
330-
$" Compressed P2SH-P2WPKH address={Address.GetP2sh_P2wpkh(pub, 0)}";
329+
$" Compressed P2WPKH address={Address.GetP2wpkh(pub)}{Environment.NewLine}" +
330+
$" Compressed P2SH-P2WPKH address={Address.GetP2sh_P2wpkh(pub)}";
331331
report.AddMessageSafe(msg);
332332
report.FoundAnyResult = true;
333333
}

0 commit comments

Comments
 (0)