diff --git a/BTCPayServer/Controllers/StoresController.BTCLike.cs b/BTCPayServer/Controllers/StoresController.BTCLike.cs index 5aed76201..cc4d6e59f 100644 --- a/BTCPayServer/Controllers/StoresController.BTCLike.cs +++ b/BTCPayServer/Controllers/StoresController.BTCLike.cs @@ -341,6 +341,7 @@ namespace BTCPayServer.Controllers } } vm.Confirmation = true; + ModelState.Remove(nameof(vm.Config)); // Remove the cached value return View(vm); } } diff --git a/BTCPayServer/Models/StoreViewModels/DerivationSchemeViewModel.cs b/BTCPayServer/Models/StoreViewModels/DerivationSchemeViewModel.cs index e176c691e..298792339 100644 --- a/BTCPayServer/Models/StoreViewModels/DerivationSchemeViewModel.cs +++ b/BTCPayServer/Models/StoreViewModels/DerivationSchemeViewModel.cs @@ -39,6 +39,7 @@ namespace BTCPayServer.Models.StoreViewModels public IFormFile ColdcardPublicFile{ get; set; } public string Config { get; set; } public string Source { get; set; } + public string DerivationSchemeFormat { get; set; } public string AccountKey { get; set; } public BTCPayNetwork Network { get; set; } } diff --git a/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml b/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml index eb6e48cb9..026b1b8fb 100644 --- a/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml +++ b/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml @@ -4,9 +4,16 @@ ViewData.SetActivePageAndTitle(StoreNavPages.Index, $"{Model.CryptoCode} Derivation scheme"); } +@section HeadScripts { + +} +

@ViewData["Title"]

-
@@ -14,37 +21,39 @@
- - + @if (!Model.Confirmation) + { + + }
+ + + @if (!Model.Confirmation) { + + +
Derivation Scheme
The DerivationScheme represents the destination of the funds received by your invoice. It is generated by your wallet software. Please, verify that you are generating the right addresses by clicking on 'Check ExtPubKey'
- - - - - -
- +
@@ -84,6 +93,22 @@
+ +
+
Additional pairing information
+
+
+ + +
+
+ + +
+
+ + +
@@ -96,14 +121,9 @@
Confirm the addresses (@Model.CryptoCode)
Please check that your @Model.CryptoCode wallet is generating the same addresses as below.
- - - - - + -
@@ -138,15 +158,13 @@ - @section Scripts { @await Html.PartialAsync("_ValidationScriptsPartial") - - - - - - + + + + + diff --git a/BTCPayServer/Views/Stores/AddDerivationSchemes_HardwareWalletDialogs.cshtml b/BTCPayServer/Views/Stores/AddDerivationSchemes_HardwareWalletDialogs.cshtml index 0d3a4bf0a..68e7dbd8b 100644 --- a/BTCPayServer/Views/Stores/AddDerivationSchemes_HardwareWalletDialogs.cshtml +++ b/BTCPayServer/Views/Stores/AddDerivationSchemes_HardwareWalletDialogs.cshtml @@ -14,7 +14,7 @@ Checking if a ledger wallet is connected... - - - - - - - @@ -140,7 +133,7 @@ { + data-trezorkeypath="@Model.Network.GetRootKeyPath(DerivationType.Segwit).Derive(i, true)" href="#">Account @i (@Model.Network.GetRootKeyPath(DerivationType.Segwit).Derive(i, true)) } @@ -154,7 +147,7 @@ { + data-trezorkeypath="@Model.Network.GetRootKeyPath(DerivationType.Legacy).Derive(i, true)">Account @i (@Model.Network.GetRootKeyPath(DerivationType.Legacy).Derive(i, true)) } diff --git a/BTCPayServer/wwwroot/js/StoreAddDerivationScheme.js b/BTCPayServer/wwwroot/js/StoreAddDerivationScheme.js index 47a474637..2cb171d93 100644 --- a/BTCPayServer/wwwroot/js/StoreAddDerivationScheme.js +++ b/BTCPayServer/wwwroot/js/StoreAddDerivationScheme.js @@ -48,13 +48,14 @@ return; showFeedback("ledger-info"); - $("#DerivationScheme").val(result.derivationScheme); $("#RootFingerprint").val(result.rootFingerprint); $("#AccountKey").val(result.extPubKey); $("#Source").val(result.source); $("#DerivationSchemeFormat").val("BTCPay"); $("#KeyPath").val(keypath); + $(".modal").modal('hide'); + $(".hw-fields").show(); }) .catch(function (reason) { Write('check', 'error', reason); }); return false;