mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-18 16:14:25 +01:00
add coordinator failsafe
This commit is contained in:
@@ -93,12 +93,20 @@ namespace BTCPayServer.Plugins.Wabisabi
|
||||
var commandIndex = pieces.Length > 1 ? pieces[1] : null;
|
||||
var coordinator = pieces.Length > 2 ? pieces[2] : null;
|
||||
vm.AnonymitySetTarget = Math.Max(2, vm.AnonymitySetTarget);
|
||||
var coord = vm.Settings.SingleOrDefault(settings => settings.Coordinator == coordinator);
|
||||
ModelState.Clear();
|
||||
|
||||
WabisabiCoordinatorSettings coordSettings;
|
||||
switch (actualCommand)
|
||||
{
|
||||
case "accept-terms":
|
||||
|
||||
var coord = vm.Settings.SingleOrDefault(settings => settings.Coordinator == commandIndex);
|
||||
coord.RoundWhenEnabled = null;
|
||||
|
||||
await _WabisabiService.SetWabisabiForStore(storeId, vm, commandIndex);
|
||||
TempData["SuccessMessage"] = $"{commandIndex} terms accepted";
|
||||
return RedirectToAction(nameof(UpdateWabisabiStoreSettings), new {storeId});
|
||||
|
||||
case "discover":
|
||||
coordSettings = await _wabisabiCoordinatorService.GetSettings();
|
||||
var relay = commandIndex ??
|
||||
|
||||
Reference in New Issue
Block a user