()),
current == 1 ? KeyState.Clean : KeyState.Used);
hdPubKey.SetAnonymitySet(labels.anonset);
- var c = new SmartCoin(tx, coin.OutPoint.N, hdPubKey);
+ var c = new SmartCoin(tx, coin.OutPoint.N, hdPubKey);
c.PropertyChanged += CoinPropertyChanged;
return c;
});
@@ -172,6 +166,22 @@ public class Smartifier
private void CoinPropertyChanged(object sender, PropertyChangedEventArgs e)
{
- _coinOnPropertyChanged.Invoke(sender, e);
+ if (sender is SmartCoin smartCoin)
+ {
+ if (e.PropertyName == nameof(SmartCoin.CoinJoinInProgress))
+ {
+ // _logger.LogInformation($"{smartCoin.Outpoint}.CoinJoinInProgress = {smartCoin.CoinJoinInProgress}");
+ if (_utxoLocker is not null)
+ {
+ _ = (smartCoin.CoinJoinInProgress
+ ? _utxoLocker.TryLock(smartCoin.Outpoint)
+ : _utxoLocker.TryUnlock(smartCoin.Outpoint)).ContinueWith(task =>
+ {
+ // _logger.LogInformation(
+ // $"{(task.Result ? "Success" : "Fail")}: {(smartCoin.CoinJoinInProgress ? "" : "un")}locking coin for coinjoin: {smartCoin.Outpoint} ");
+ });
+ }
+ }
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Plugins/BTCPayServer.Plugins.Wabisabi/Views/Shared/Wabisabi/WabisabiDashboard.cshtml b/Plugins/BTCPayServer.Plugins.Wabisabi/Views/Shared/Wabisabi/WabisabiDashboard.cshtml
index 278f063..88b1319 100644
--- a/Plugins/BTCPayServer.Plugins.Wabisabi/Views/Shared/Wabisabi/WabisabiDashboard.cshtml
+++ b/Plugins/BTCPayServer.Plugins.Wabisabi/Views/Shared/Wabisabi/WabisabiDashboard.cshtml
@@ -42,7 +42,7 @@
{
var settings = await WabisabiService.GetWabisabiForStore(storeId);
var enabledSettings = settings.Settings.Where(coordinatorSettings => coordinatorSettings.Enabled);
- var cjHistory = (await WabisabiService.GetCoinjoinHistory(storeId)).Take(10).ToList();
+ var cjHistory = (await WabisabiService.GetCoinjoinHistory(storeId)).Take(5).ToList();
@if (!enabledSettings.Any())
{
@@ -63,7 +63,9 @@
}
else
{
-