mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 07:34:24 +01:00
make terms acceptnace clearert
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<PropertyGroup>
|
||||
<Product>Coinjoin</Product>
|
||||
<Description>Allows you to integrate your btcpayserver store with coinjoins.</Description>
|
||||
<Version>1.0.73</Version>
|
||||
<Version>1.0.74</Version>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -392,7 +392,14 @@ updateInProgressAnimation(myChart);
|
||||
}
|
||||
else if (coordinator.WasabiCoordinatorStatusFetcher.Connected)
|
||||
{
|
||||
if (coordinator.CoinJoinManager.TrackedWallets.TryGetValue(wallet.WalletName, out _))
|
||||
var roundParameters = coordinator.RoundStateUpdater.RoundStates.LastOrDefault(pair => pair.Value.BlameOf == uint256.Zero).Value?.CoinjoinState.Parameters;
|
||||
coordinator.CoinJoinManager.TrackedWallets.TryGetValue(wallet.WalletName, out var trackedWallet);
|
||||
if(trackedWallet is {} && setting.RoundWhenEnabled is not null && roundParameters is not null && !BTCPayWallet.IsRoundOk(roundParameters, setting))
|
||||
{
|
||||
<a asp-controller="WabisabiStore" asp-action="UpdateWabisabiStoreSettings" asp-route-storeId="@storeId" class="h6 text-danger">
|
||||
New terms detected
|
||||
</a>
|
||||
}else if (trackedWallet is {})
|
||||
{
|
||||
<span class="h6">Idle</span>
|
||||
}
|
||||
|
||||
@@ -116,22 +116,21 @@ namespace BTCPayServer.Plugins.Wabisabi
|
||||
{
|
||||
wabisabiStoreCoordinatorSettings.RoundWhenEnabled = null;
|
||||
}
|
||||
else if (
|
||||
(termsCoord == wabisabiStoreCoordinatorSettings.Coordinator ||
|
||||
res?.Settings?.Find(settings =>
|
||||
settings.Coordinator == wabisabiStoreCoordinatorSettings.Coordinator)
|
||||
?.RoundWhenEnabled is null) &&
|
||||
_coordinatorClientInstanceManager.HostedServices.TryGetValue(
|
||||
wabisabiStoreCoordinatorSettings.Coordinator, out var coordinator))
|
||||
else if ((termsCoord == wabisabiStoreCoordinatorSettings.Coordinator || wabisabiStoreCoordinatorSettings.RoundWhenEnabled is null)&&
|
||||
_coordinatorClientInstanceManager.HostedServices.TryGetValue(wabisabiStoreCoordinatorSettings.Coordinator, out var coordinator))
|
||||
{
|
||||
|
||||
var round = coordinator.RoundStateUpdater.RoundStates.LastOrDefault();
|
||||
wabisabiStoreCoordinatorSettings.RoundWhenEnabled = new LastCoordinatorRoundConfig()
|
||||
wabisabiStoreCoordinatorSettings.RoundWhenEnabled =
|
||||
round.Value?.CoinjoinState?.Parameters is { } roundParameters
|
||||
? new LastCoordinatorRoundConfig()
|
||||
{
|
||||
CoordinationFeeRate = round.Value.CoinjoinState.Parameters.CoordinationFeeRate.Rate,
|
||||
PlebsDontPayThreshold = round.Value.CoinjoinState.Parameters.CoordinationFeeRate
|
||||
CoordinationFeeRate = roundParameters.CoordinationFeeRate.Rate,
|
||||
PlebsDontPayThreshold = roundParameters.CoordinationFeeRate
|
||||
.PlebsDontPayThreshold.Satoshi.ToString(),
|
||||
MinInputCountByRound = round.Value.CoinjoinState.Parameters.MinInputCountByRound,
|
||||
};
|
||||
MinInputCountByRound = roundParameters.MinInputCountByRound,
|
||||
}
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user