update and fix

This commit is contained in:
Kukks
2024-10-29 12:46:59 +01:00
parent 04dbeb433c
commit 9715917396
16 changed files with 36 additions and 41 deletions

View File

@@ -9,7 +9,7 @@
<PropertyGroup> <PropertyGroup>
<Product>Bringin</Product> <Product>Bringin</Product>
<Description>Euro Offramp</Description> <Description>Euro Offramp</Description>
<Version>1.0.2</Version> <Version>1.0.3</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup> </PropertyGroup>
<!-- Plugin development properties --> <!-- Plugin development properties -->

View File

@@ -12,7 +12,7 @@
<PropertyGroup> <PropertyGroup>
<Product>Liquid+</Product> <Product>Liquid+</Product>
<Description>Enhanced support for the liquid network.</Description> <Description>Enhanced support for the liquid network.</Description>
<Version>1.1.5</Version> <Version>1.1.6</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup> </PropertyGroup>

View File

@@ -66,8 +66,11 @@ namespace BTCPayServer.Plugins.LiquidPlus
.Replace("-", "") .Replace("-", "")
.Replace("_", "").ToUpperInvariant(); .Replace("_", "").ToUpperInvariant();
if(code == "LBTC" || code == "USDT" || code == "ETB" || code == "LCAD") if(code == "LBTC" || code == "USDT" || code == "LCAD")
return; return;
var pmi2 = PaymentTypes.CHAIN.GetPaymentMethodId(code);
services.AddBTCPayNetwork(new ElementsBTCPayNetwork() services.AddBTCPayNetwork(new ElementsBTCPayNetwork()
{ {
CryptoCode = code, CryptoCode = code,
@@ -90,7 +93,8 @@ namespace BTCPayServer.Plugins.LiquidPlus
VaultSupported = template.VaultSupported, VaultSupported = template.VaultSupported,
MaxTrackedConfirmation = template.MaxTrackedConfirmation, MaxTrackedConfirmation = template.MaxTrackedConfirmation,
SupportRBF = template.SupportRBF SupportRBF = template.SupportRBF
}).AddTransactionLinkProvider(code, tlProvider.Provider); });
services.AddSingleton(tlProvider with {PaymentMethodId = pmi2});
}); });
} }
} }

View File

@@ -1,13 +1,7 @@
@inject ContentSecurityPolicies contentSecurityPolicies
@using BTCPayServer.Security @using BTCPayServer.Security
@using NBitcoin
@model BTCPayServer.Plugins.LiquidPlus.Models.CustomLiquidAssetsViewModel @model BTCPayServer.Plugins.LiquidPlus.Models.CustomLiquidAssetsViewModel
@{ @{
Layout = "../Shared/_NavLayout.cshtml";
ViewData["NavPartialName"] = "../UIServer/_Nav";
ViewData["Title"] = "Custom Liquid Assets"; ViewData["Title"] = "Custom Liquid Assets";
var nonce = RandomUtils.GetUInt256().ToString().Substring(0, 32);
contentSecurityPolicies.Add("script-src", $"'nonce-{nonce}'");
} }
@if (Model.PendingChanges) @if (Model.PendingChanges)
{ {
@@ -67,7 +61,7 @@
<button id="import-liquid-asset-from-registry" type="button" class="btn btn-secondary">Import from Blockstream Asset Registry</button> <button id="import-liquid-asset-from-registry" type="button" class="btn btn-secondary">Import from Blockstream Asset Registry</button>
<button type="submit" class="btn btn-primary" name="command" value="Save">Save</button> <button type="submit" class="btn btn-primary" name="command" value="Save">Save</button>
</div> </div>
<script type="text/javascript" nonce="@nonce"> <script type="text/javascript">
document.getElementById("import-liquid-asset-from-registry").addEventListener("click", function (){ document.getElementById("import-liquid-asset-from-registry").addEventListener("click", function (){
var id = prompt("Enter the asset id"); var id = prompt("Enter the asset id");
if (id){ if (id){

View File

@@ -1,7 +1,13 @@
@using BTCPayServer.Client
@using BTCPayServer.Plugins.LiquidPlus.Controllers @using BTCPayServer.Plugins.LiquidPlus.Controllers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@{ @{
var isActive = ViewContext.RouteData.Values.TryGetValue("Controller", out var controller) && controller is not null && var isActive = ViewContext.RouteData.Values.TryGetValue("Controller", out var controller) && controller is not null &&
nameof(CustomLiquidAssetsController).StartsWith(controller?.ToString(), StringComparison.InvariantCultureIgnoreCase); nameof(CustomLiquidAssetsController).StartsWith(controller?.ToString(), StringComparison.InvariantCultureIgnoreCase);
} }
<li class="nav-item nav-item-sub" permission="@Policies.CanModifyServerSettings">
<a class="nav-link @(isActive ? "active" : string.Empty)"asp-action="Assets" asp-controller="CustomLiquidAssets">Liquid Assets</a> <a class="nav-link @(isActive ? "active" : string.Empty)"asp-action="Assets" asp-controller="CustomLiquidAssets">Liquid Assets</a>
</li>

View File

@@ -1,12 +1,8 @@
@using BTCPayServer
@using BTCPayServer.Abstractions.Contracts @using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Client @using BTCPayServer.Client
@using BTCPayServer.Plugins.Altcoins
@using BTCPayServer.Plugins.LiquidPlus.Controllers @using BTCPayServer.Plugins.LiquidPlus.Controllers
@using Microsoft.AspNetCore.Mvc.TagHelpers @using Microsoft.AspNetCore.Mvc.TagHelpers
@using Microsoft.AspNetCore.Routing
@inject BTCPayNetworkProvider BTCPayNetworkProvider;
@inject IScopeProvider ScopeProvider @inject IScopeProvider ScopeProvider
@{ @{
@@ -14,7 +10,7 @@
var isActive = !string.IsNullOrEmpty(storeId) && ViewContext.RouteData.Values.TryGetValue("Controller", out var controller) && controller is not null && var isActive = !string.IsNullOrEmpty(storeId) && ViewContext.RouteData.Values.TryGetValue("Controller", out var controller) && controller is not null &&
nameof(StoreLiquidController).StartsWith(controller?.ToString(), StringComparison.InvariantCultureIgnoreCase); nameof(StoreLiquidController).StartsWith(controller?.ToString(), StringComparison.InvariantCultureIgnoreCase);
} }
@if (!string.IsNullOrEmpty(storeId) && (BTCPayNetworkProvider.GetAll().OfType<ElementsBTCPayNetwork>().Any())) @if (!string.IsNullOrEmpty(storeId) )
{ {
<li class="nav-item" permission="@Policies.CanModifyStoreSettings"> <li class="nav-item" permission="@Policies.CanModifyStoreSettings">
<a asp-route-storeId="@storeId" asp-action="GenerateLiquidScript" asp-controller="StoreLiquid" class="nav-link js-scroll-trigger @(isActive ? "active" : string.Empty)"> <a asp-route-storeId="@storeId" asp-action="GenerateLiquidScript" asp-controller="StoreLiquid" class="nav-link js-scroll-trigger @(isActive ? "active" : string.Empty)">

View File

@@ -20,11 +20,11 @@
if (!walletSetupViewModel.Confirmation && walletSetupViewModel.Method == WalletSetupMethod.ImportOptions) if (!walletSetupViewModel.Confirmation && walletSetupViewModel.Method == WalletSetupMethod.ImportOptions)
{ {
<script> @* <script> *@
document.addEventListener('DOMContentLoaded', () => { @* document.addEventListener('DOMContentLoaded', () => { *@
document.querySelectorAll(".list-group-item:not(#ImportSeedLink)").forEach(e => e.parentElement.remove()); @* document.querySelectorAll(".list-group-item:not(#ImportSeedLink)").forEach(e => e.parentElement.remove()); *@
}); @* }); *@
</script> @* </script> *@
} }
if (!walletSetupViewModel.Confirmation && walletSetupViewModel.Method is WalletSetupMethod.HotWallet or WalletSetupMethod.Seed) if (!walletSetupViewModel.Confirmation && walletSetupViewModel.Method is WalletSetupMethod.HotWallet or WalletSetupMethod.Seed)
{ {

View File

@@ -1,17 +1,13 @@
@using BTCPayServer
@using BTCPayServer.Abstractions.Contracts @using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Plugins.Altcoins
@using BTCPayServer.Plugins.LiquidPlus.Controllers @using BTCPayServer.Plugins.LiquidPlus.Controllers
@using Microsoft.AspNetCore.Mvc.TagHelpers @using Microsoft.AspNetCore.Mvc.TagHelpers
@using Microsoft.AspNetCore.Routing
@inject BTCPayNetworkProvider BTCPayNetworkProvider;
@inject IScopeProvider ScopeProvider @inject IScopeProvider ScopeProvider
@{ @{
var storeId = ScopeProvider.GetCurrentStoreId(); var storeId = ScopeProvider.GetCurrentStoreId();
var isActive = !string.IsNullOrEmpty(storeId) && ViewContext.RouteData.Values.TryGetValue("Controller", out var controller) && controller is not null && var isActive = !string.IsNullOrEmpty(storeId) && ViewContext.RouteData.Values.TryGetValue("Controller", out var controller) && controller is not null &&
nameof(StoreLiquidController).StartsWith(controller?.ToString(), StringComparison.InvariantCultureIgnoreCase); nameof(StoreLiquidController).StartsWith(controller?.ToString(), StringComparison.InvariantCultureIgnoreCase);
} }
@if (BTCPayNetworkProvider.GetAll().OfType<ElementsBTCPayNetwork>().Any())
{
<a class="nav-link @(isActive ? "active" : string.Empty)" asp-route-storeId="@storeId" asp-action="GenerateLiquidScript" asp-controller="StoreLiquid">Liquid</a> <a class="nav-link @(isActive ? "active" : string.Empty)" asp-route-storeId="@storeId" asp-action="GenerateLiquidScript" asp-controller="StoreLiquid">Liquid</a>
}

View File

@@ -1,8 +1,6 @@
@model BTCPayServer.Plugins.LiquidPlus.Controllers.StoreLiquidController.GenerateLiquidImportScripts @model BTCPayServer.Plugins.LiquidPlus.Controllers.StoreLiquidController.GenerateLiquidImportScripts
@{ @{
Layout = "../Shared/_NavLayout.cshtml";
ViewData["NavPartialName"] = "../UIStores/_Nav";
ViewBag.MainTitle = "Store settings"; ViewBag.MainTitle = "Store settings";
ViewData["title"] = "Liquid Import"; ViewData["title"] = "Liquid Import";
} }

View File

@@ -1,2 +1,5 @@
@addTagHelper *, BTCPayServer.Abstractions @using BTCPayServer.Abstractions.Services
@inject Safe Safe
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, BTCPayServer
@addTagHelper *, BTCPayServer.Abstractions

View File

@@ -11,7 +11,7 @@
<PropertyGroup> <PropertyGroup>
<Product>Prism</Product> <Product>Prism</Product>
<Description>Automated value splits for Bitcoin.</Description> <Description>Automated value splits for Bitcoin.</Description>
<Version>1.2.9</Version> <Version>1.3.0</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup> </PropertyGroup>
<!-- Plugin development properties --> <!-- Plugin development properties -->

View File

@@ -9,7 +9,7 @@
<PropertyGroup> <PropertyGroup>
<Product>SideShift</Product> <Product>SideShift</Product>
<Description>Allows you to embed a SideShift conversion screen to allow customers to pay with altcoins.</Description> <Description>Allows you to embed a SideShift conversion screen to allow customers to pay with altcoins.</Description>
<Version>1.1.14</Version> <Version>1.1.15</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup> </PropertyGroup>
<!-- Plugin development properties --> <!-- Plugin development properties -->

View File

@@ -201,7 +201,7 @@ namespace BTCPayServer.Plugins.SideShift
PullPaymentId = pullPaymentId, PullPaymentId = pullPaymentId,
Destination = destination.destination, Destination = destination.destination,
PayoutMethodId = pmi, PayoutMethodId = pmi,
Value = request.Amount ClaimedAmount = request.Amount
}); });
if (claim.Result == ClaimRequest.ClaimResult.Ok) if (claim.Result == ClaimRequest.ClaimResult.Ok)
{ {

View File

@@ -13,7 +13,7 @@
<PropertyGroup> <PropertyGroup>
<Product>Coinjoin</Product> <Product>Coinjoin</Product>
<Description>Allows you to integrate your btcpayserver store with coinjoins.</Description> <Description>Allows you to integrate your btcpayserver store with coinjoins.</Description>
<Version>1.0.102</Version> <Version>1.0.103</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup> </PropertyGroup>

View File

@@ -5,8 +5,6 @@
@inject WalletProvider WalletProvider @inject WalletProvider WalletProvider
@{ @{
var storeId = _scopeProvider.GetCurrentStoreId(); var storeId = _scopeProvider.GetCurrentStoreId();
Layout = "../Shared/_NavLayout.cshtml";
ViewData["NavPartialName"] = "../UIStores/_Nav";
ViewData.SetActivePage("Plugins", "BTCPayServer.Views.Stores.StoreNavPages", "Spend", storeId); ViewData.SetActivePage("Plugins", "BTCPayServer.Views.Stores.StoreNavPages", "Spend", storeId);
var wallet = (BTCPayWallet) await WalletProvider.GetWalletAsync(storeId); var wallet = (BTCPayWallet) await WalletProvider.GetWalletAsync(storeId);
var coins = await wallet.GetAllCoins(); var coins = await wallet.GetAllCoins();