diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index 655414b04..10b6c4fdc 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -120,6 +120,7 @@ + diff --git a/BTCPayServer/Controllers/WalletsController.cs b/BTCPayServer/Controllers/WalletsController.cs index 7c15f77a8..77622cacd 100644 --- a/BTCPayServer/Controllers/WalletsController.cs +++ b/BTCPayServer/Controllers/WalletsController.cs @@ -662,13 +662,26 @@ namespace BTCPayServer.Controllers uriBuilder.UnknowParameters.TryGetValue("bpu", out var vmPayJoinEndpointUrl); vm.PayJoinEndpointUrl = vmPayJoinEndpointUrl; } - catch (Exception) + catch { - TempData.SetStatusMessageModel(new StatusMessageModel() + try { - Severity = StatusMessageModel.StatusSeverity.Error, - Message = "The provided BIP21 payment URI was malformed" - }); + vm.Outputs = new List() + { + new WalletSendModel.TransactionOutput() + { + DestinationAddress = BitcoinAddress.Create(bip21, network.NBitcoinNetwork).ToString() + } + }; + } + catch + { + TempData.SetStatusMessageModel(new StatusMessageModel() + { + Severity = StatusMessageModel.StatusSeverity.Error, + Message = "The provided BIP21 payment URI was malformed" + }); + } } ModelState.Clear(); diff --git a/BTCPayServer/Views/Wallets/WalletCameraScanner.cshtml b/BTCPayServer/Views/Wallets/WalletCameraScanner.cshtml new file mode 100644 index 000000000..5081c8d0f --- /dev/null +++ b/BTCPayServer/Views/Wallets/WalletCameraScanner.cshtml @@ -0,0 +1,51 @@ +@model WalletSendModel + + + + + + + + + + + + × + + + + + + + {{errorMessage}} + {{data}} + + Submit + Retry + Cancel + + + + + + + + + + + diff --git a/BTCPayServer/Views/Wallets/WalletSend.cshtml b/BTCPayServer/Views/Wallets/WalletSend.cshtml index 2530d2f20..808c1e33f 100644 --- a/BTCPayServer/Views/Wallets/WalletSend.cshtml +++ b/BTCPayServer/Views/Wallets/WalletSend.cshtml @@ -1,4 +1,5 @@ -@using Microsoft.AspNetCore.Mvc.ModelBinding +@addTagHelper *, BundlerMinifier.TagHelpers +@using Microsoft.AspNetCore.Mvc.ModelBinding @model WalletSendModel @{ Layout = "../Shared/_NavLayout.cshtml"; @@ -13,7 +14,9 @@ } + + @@ -198,16 +201,17 @@ } - Add another destination - Parse BIP21 + Add another destination + + -@section Scripts +@section HeadScripts { - +