Skip to content

Commit 8b9d5fb

Browse files
committed
Bump, and nicer error message if amount are negative in create PSBT
1 parent 916a52b commit 8b9d5fb

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

NBXplorer.Client/NBXplorer.Client.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.1</TargetFrameworks>
55
<Company>Digital Garage</Company>
6-
<Version>4.3.6</Version>
6+
<Version>4.3.7</Version>
77
<Copyright>Copyright © Digital Garage 2017</Copyright>
88
<Description>Client API for the minimalist HD Wallet Tracker NBXplorer</Description>
99
<PackageIcon>Bitcoin.png</PackageIcon>

NBXplorer/Controllers/MainController.PSBT.cs

+2
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ public async Task<IActionResult> CreatePSBT(
240240
bool sweepAll = false;
241241
foreach (var dest in request.Destinations)
242242
{
243+
if (dest.Amount < Money.Zero)
244+
throw new NBXplorerException(new NBXplorerError(400, "output-too-small", "Amount can't be negative", reason: OutputTooSmallException.ErrorType.TooSmallBeforeSubtractedFee.ToString()));
243245
if (dest.SweepAll)
244246
{
245247
sweepAll = true;

NBXplorer/NBXplorer.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<OutputType>Exe</OutputType>
44
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">net8.0</TargetFramework>
55
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework>
6-
<Version>2.5.17</Version>
6+
<Version>2.5.18</Version>
77
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\NBXplorer.xml</DocumentationFile>
88
<NoWarn>1701;1702;1705;1591;CS1591</NoWarn>
99
<LangVersion>12</LangVersion>

0 commit comments

Comments
 (0)