mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Wallet: Signing UI improvements (#2559)
* Refactoring to generalize wizard layout * Wallet: Add intermediate signing options view * Update BTCPayServer/Views/Wallets/WalletSigningOptions.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> * Skip signing options for hot wallets * Update signing options wordings, add PSBT doc link * Fix test * Remove form route params * Use decode command for PSBT Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
This commit is contained in:
@@ -17,5 +17,6 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
public string PayJoinBIP21 { get; set; }
|
||||
public bool? EnforceLowR { get; set; }
|
||||
public string ChangeAddress { get; set; }
|
||||
public bool NBXSeedAvailable { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
[Display(Name = "Upload PSBT from file...")]
|
||||
public IFormFile UploadedPSBTFile { get; set; }
|
||||
|
||||
public SigningContextModel SigningContext { get; set; } = new SigningContextModel();
|
||||
|
||||
public async Task<PSBT> GetPSBT(Network network)
|
||||
{
|
||||
if (UploadedPSBTFile != null)
|
||||
@@ -56,6 +58,10 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
PSBT = await stream.ReadToEndAsync();
|
||||
}
|
||||
}
|
||||
if (SigningContext != null && !string.IsNullOrEmpty(SigningContext.PSBT))
|
||||
{
|
||||
PSBT = SigningContext.PSBT;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(PSBT))
|
||||
{
|
||||
try
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BTCPayServer.Models.WalletViewModels
|
||||
{
|
||||
public class WalletSigningOptionsModel
|
||||
{
|
||||
public WalletSigningOptionsModel(
|
||||
SigningContextModel signingContext,
|
||||
IDictionary<string, string> routeDataBack)
|
||||
{
|
||||
SigningContext = signingContext;
|
||||
RouteDataBack = routeDataBack;
|
||||
}
|
||||
|
||||
public SigningContextModel SigningContext { get; }
|
||||
public IDictionary<string, string> RouteDataBack { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user