quick fix

This commit is contained in:
Kukks
2023-02-25 19:42:06 +01:00
parent c9c1776c53
commit 5d1fee6302
3 changed files with 11 additions and 6 deletions

View File

@@ -13,7 +13,7 @@
<PropertyGroup>
<Product>Wabisabi Coinjoin</Product>
<Description>Allows you to integrate your btcpayserver store with coinjoins.</Description>
<Version>1.0.13</Version>
<Version>1.0.14</Version>
</PropertyGroup>
<!-- Plugin development properties -->

View File

@@ -169,13 +169,18 @@ public class BTCPayWallet : IWallet, IDestinationProvider
}
public static bool IsRoundOk(RoundParameters roundParameters, WabisabiStoreCoordinatorSettings coordSettings)
{
if (coordSettings.RoundWhenEnabled is null)
try
{
return coordSettings.RoundWhenEnabled is not null &&
roundParameters.CoordinationFeeRate.Rate <= coordSettings.RoundWhenEnabled.CoordinationFeeRate &&
roundParameters.CoordinationFeeRate.PlebsDontPayThreshold <=
coordSettings.RoundWhenEnabled.PlebsDontPayThreshold &&
roundParameters.MinInputCountByRound <= coordSettings.RoundWhenEnabled.MinInputCountByRound;
}
catch (Exception e)
{
return false;
}
return roundParameters.CoordinationFeeRate.Rate <= coordSettings.RoundWhenEnabled.CoordinationFeeRate &&
roundParameters.CoordinationFeeRate.PlebsDontPayThreshold <= coordSettings.RoundWhenEnabled.PlebsDontPayThreshold &&
roundParameters.MinInputCountByRound <= coordSettings.RoundWhenEnabled.MinInputCountByRound;
}
public async Task<IEnumerable<SmartCoin>> GetCoinjoinCoinCandidatesAsync(string coordinatorName)
{