From 0bb47d4a979f6b5697a06f6647b69166329ee1bc Mon Sep 17 00:00:00 2001 From: Kukks Date: Mon, 15 May 2023 15:56:45 +0200 Subject: [PATCH] update --- .../BTCPayServer.Plugins.Wabisabi.csproj | 4 ++-- .../Coordinator/WabisabiCoordinatorConfigController.cs | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Plugins/BTCPayServer.Plugins.Wabisabi/BTCPayServer.Plugins.Wabisabi.csproj b/Plugins/BTCPayServer.Plugins.Wabisabi/BTCPayServer.Plugins.Wabisabi.csproj index 57ed9b3..4eb5b18 100644 --- a/Plugins/BTCPayServer.Plugins.Wabisabi/BTCPayServer.Plugins.Wabisabi.csproj +++ b/Plugins/BTCPayServer.Plugins.Wabisabi/BTCPayServer.Plugins.Wabisabi.csproj @@ -13,7 +13,7 @@ Wabisabi Coinjoin Allows you to integrate your btcpayserver store with coinjoins. - 1.0.42 + 1.0.43 @@ -43,7 +43,7 @@ - + diff --git a/Plugins/BTCPayServer.Plugins.Wabisabi/Coordinator/WabisabiCoordinatorConfigController.cs b/Plugins/BTCPayServer.Plugins.Wabisabi/Coordinator/WabisabiCoordinatorConfigController.cs index 29bc577..9466683 100644 --- a/Plugins/BTCPayServer.Plugins.Wabisabi/Coordinator/WabisabiCoordinatorConfigController.cs +++ b/Plugins/BTCPayServer.Plugins.Wabisabi/Coordinator/WabisabiCoordinatorConfigController.cs @@ -33,9 +33,12 @@ Privacy risks: as the coordinator, the user may have access to sensitive transac Reputation risks: as the coordinator, the user may be associated with illegal activities and may face reputational damage."; private readonly WabisabiCoordinatorService _wabisabiCoordinatorService; - public WabisabiCoordinatorConfigController(WabisabiCoordinatorService wabisabiCoordinatorService) + private readonly BTCPayNetworkProvider _networkProvider; + + public WabisabiCoordinatorConfigController(WabisabiCoordinatorService wabisabiCoordinatorService, BTCPayNetworkProvider networkProvider) { _wabisabiCoordinatorService = wabisabiCoordinatorService; + _networkProvider = networkProvider; } [HttpGet("")] @@ -86,9 +89,8 @@ Reputation risks: as the coordinator, the user may be associated with illegal ac switch (command) { case "nostr-current-url": - if (IsLocalNetwork(Request.GetAbsoluteRoot())) + if (_networkProvider.NetworkType != ChainName.Regtest && IsLocalNetwork(Request.GetAbsoluteRoot())) { - TempData["ErrorMessage"] = "the current url is only reachable from your local network. You need a public domain or use Tor."; return View(vm); }