diff --git a/BTCPayServer/Controllers/WalletsController.cs b/BTCPayServer/Controllers/WalletsController.cs index ec93f8578..48c710617 100644 --- a/BTCPayServer/Controllers/WalletsController.cs +++ b/BTCPayServer/Controllers/WalletsController.cs @@ -388,7 +388,7 @@ namespace BTCPayServer.Controllers [Route("{walletId}/send")] public async Task WalletSend( [ModelBinder(typeof(WalletIdModelBinder))] - WalletId walletId, string defaultDestination = null, string defaultAmount = null) + WalletId walletId, string defaultDestination = null, string defaultAmount = null, string bip21 = null) { if (walletId?.StoreId == null) return NotFound(); @@ -416,6 +416,10 @@ namespace BTCPayServer.Controllers }, CryptoCode = walletId.CryptoCode }; + if (!string.IsNullOrEmpty(bip21)) + { + LoadFromBIP21(model, bip21, network); + } var feeProvider = _feeRateProvider.CreateFeeProvider(network); var recommendedFees = new[] @@ -1173,6 +1177,8 @@ namespace BTCPayServer.Controllers var store = (await Repository.FindStore(walletId.StoreId, GetUserId())); var vm = new WalletSettingsViewModel() { + StoreName = store.StoreName, + UriScheme = derivationSchemeSettings.Network.UriScheme, Label = derivationSchemeSettings.Label, DerivationScheme = derivationSchemeSettings.AccountDerivation.ToString(), DerivationSchemeInput = derivationSchemeSettings.AccountOriginal, diff --git a/BTCPayServer/Models/WalletViewModels/WalletSettingsViewModel.cs b/BTCPayServer/Models/WalletViewModels/WalletSettingsViewModel.cs index fcb4101d5..8ef89b548 100644 --- a/BTCPayServer/Models/WalletViewModels/WalletSettingsViewModel.cs +++ b/BTCPayServer/Models/WalletViewModels/WalletSettingsViewModel.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; @@ -17,6 +17,8 @@ namespace BTCPayServer.Models.WalletViewModels public List AccountKeys { get; set; } = new List(); public bool NBXSeedAvailable { get; set; } + public string StoreName { get; set; } + public string UriScheme { get; set; } } public class WalletSettingsAccountKeyViewModel diff --git a/BTCPayServer/Views/Wallets/ListWallets.cshtml b/BTCPayServer/Views/Wallets/ListWallets.cshtml index c66348166..ca1cf5f80 100644 --- a/BTCPayServer/Views/Wallets/ListWallets.cshtml +++ b/BTCPayServer/Views/Wallets/ListWallets.cshtml @@ -30,7 +30,7 @@ Store Name Crypto Code Balance - Actions + Actions @@ -47,7 +47,7 @@ } @wallet.CryptoCode @wallet.Balance - + Manage diff --git a/BTCPayServer/Views/Wallets/WalletSettings.cshtml b/BTCPayServer/Views/Wallets/WalletSettings.cshtml index 6aed44c94..bb7021e56 100644 --- a/BTCPayServer/Views/Wallets/WalletSettings.cshtml +++ b/BTCPayServer/Views/Wallets/WalletSettings.cshtml @@ -23,48 +23,50 @@
+ +
- +
- +
@if (!string.IsNullOrEmpty(Model.DerivationSchemeInput) && Model.DerivationSchemeInput != Model.DerivationScheme) {
- +
} @for (int i = 0; i < Model.AccountKeys.Count; i++) { -
+
Account key @i
- +
- +
- +
@if (Model.IsMultiSig) {
- +
} } @@ -80,9 +82,35 @@ { } + + @if (Model.UriScheme == "bitcoin") + { + + }
+ + + +