Skip to content

Commit af2226b

Browse files
committed
Do not require the HDScriptPubKey for GetBalance
1 parent 69e6fb9 commit af2226b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

NBitcoin/BIP174/PartiallySignedTransaction.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,10 +1075,8 @@ public Money GetBalance(ScriptPubKeyType scriptPubKeyType, IHDKey accountKey, Ro
10751075
/// <param name="accountKey">The account key that will be used to sign (ie. 49'/0'/0')</param>
10761076
/// <param name="accountKeyPath">The account key path</param>
10771077
/// <returns>The balance change</returns>
1078-
public Money GetBalance(IHDScriptPubKey accountHDScriptPubKey, IHDKey accountKey, RootedKeyPath? accountKeyPath = null)
1078+
public Money GetBalance(IHDScriptPubKey? accountHDScriptPubKey, IHDKey accountKey, RootedKeyPath? accountKeyPath = null)
10791079
{
1080-
if (accountHDScriptPubKey == null)
1081-
throw new ArgumentNullException(nameof(accountHDScriptPubKey));
10821080
Money total = Money.Zero;
10831081
foreach (var o in CoinsFor(accountHDScriptPubKey, accountKey, accountKeyPath))
10841082
{

NBitcoin/NBitcoin.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<RepositoryType>git</RepositoryType>
1313
</PropertyGroup>
1414
<PropertyGroup>
15-
<Version Condition=" '$(Version)' == '' ">8.0.15</Version>
15+
<Version Condition=" '$(Version)' == '' ">8.0.16</Version>
1616
<LangVersion>12.0</LangVersion>
1717
</PropertyGroup>
1818
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

0 commit comments

Comments
 (0)