Compare commits

...

4 Commits

Author SHA1 Message Date
fcd50a3f6f update nbx 2023-06-01 12:14:01 +02:00
9ce1e3bb08 Merge branch 'master' into pluginify-onchain-wallet 2023-06-01 08:13:13 +02:00
2453c51954 Update BTCPayServer/Controllers/UIStoresController.Onchain.cs 2023-05-31 15:27:47 +02:00
eb3f0dbf93 Pluginify on chain wallet setup
This PR fixes a few logical points in the wallet setup flow to allow more extensive plugin flexibility; It also fixes an issue when building plugins that requires an Altcoin config profile. Here is an example showcasing the Liquid+ plugin using this to enforce that it is a hot wallet (a requirement it has) and that import to RPC is always set, and a new option that is used to configure the wallet further https://i.imgur.com/pDPQ73v.gif
2023-05-25 12:02:39 +02:00
6 changed files with 16 additions and 4 deletions

View File

@ -12,6 +12,8 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/btcpayserver/btcpayserver</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Configurations>Debug;Release;Altcoins-Debug;Altcoins-Release</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<PropertyGroup>
<Version Condition=" '$(Version)' == '' ">1.7.2</Version>

View File

@ -4,7 +4,7 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="NBXplorer.Client" Version="4.2.3" />
<PackageReference Include="NBXplorer.Client" Version="4.2.5" />
<PackageReference Include="NicolasDorier.StandardConfiguration" Version="2.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(Altcoins)' != 'true'">

View File

@ -1,4 +1,5 @@
using System;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
@ -250,7 +251,7 @@ namespace BTCPayServer.Controllers
CryptoCode = cryptoCode,
Method = method,
SetupRequest = request,
Confirmation = string.IsNullOrEmpty(request.ExistingMnemonic),
Confirmation = !isImport,
Network = network,
Source = isImport ? "SeedImported" : "NBXplorerGenerated",
IsHotWallet = isImport ? request.SavePrivateKeys : method == WalletSetupMethod.HotWallet,
@ -311,7 +312,7 @@ namespace BTCPayServer.Controllers
var result = await UpdateWallet(vm);
if (!ModelState.IsValid || !(result is RedirectToActionResult))
if (!ModelState.IsValid || result is not RedirectToActionResult)
return result;
if (!isImport)

View File

@ -1,3 +1,4 @@
using System.Collections.Generic;
using NBXplorer.Models;
namespace BTCPayServer.Models.StoreViewModels

View File

@ -140,7 +140,13 @@
</div>
</div>
</div>
@if (Model.AdditionalOptions is not null)
{
@foreach (var dictKeys in Model.AdditionalOptions)
{
<input type="hidden" asp-for="AdditionalOptions[dictKeys.Key]" />
}
}
<button type="submit" class="btn btn-primary" id="Continue">@(isImport ? "Continue" : "Create")</button>
</form>

View File

@ -19,3 +19,5 @@
}
@RenderBody()
<vc:ui-extension-point location="onchain-wallet-setup-post-body" model="@Model"/>