Fix bug: Importing seed with Is hot wallet checked was not working (#2966)

This commit is contained in:
Nicolas Dorier
2021-10-12 18:37:13 +09:00
committed by GitHub
parent b5ebd14589
commit 75776687bc
3 changed files with 21 additions and 2 deletions

View File

@@ -781,6 +781,26 @@ namespace BTCPayServer.Tests
}
}
[Fact(Timeout = TestTimeout)]
public async Task CanImportMnemonic()
{
using (var s = SeleniumTester.Create())
{
await s.StartAsync();
s.RegisterNewUser(true);
foreach (var isHotwallet in new[] { false, true })
{
var (storeName, storeId) = s.CreateNewStore();
s.GenerateWallet(privkeys: isHotwallet, seed: "melody lizard phrase voice unique car opinion merge degree evil swift cargo");
s.GoToWallet(s.WalletId, WalletsNavPages.Settings);
if (isHotwallet)
Assert.Contains("View seed", s.Driver.PageSource);
else
Assert.DoesNotContain("View seed", s.Driver.PageSource);
}
}
}
[Fact(Timeout = TestTimeout)]
public async Task CanManageWallet()
{

View File

@@ -163,7 +163,7 @@ namespace BTCPayServer.Controllers
store.SetSupportedPaymentMethod(paymentMethodId, strategy);
storeBlob.SetExcluded(paymentMethodId, false);
storeBlob.Hints.Wallet = false;
storeBlob.PayJoinEnabled = vm.IsHotWallet && vm.SetupRequest.PayJoinEnabled;
storeBlob.PayJoinEnabled = strategy.IsHotWallet && !(vm.SetupRequest?.PayJoinEnabled is false);
store.SetStoreBlob(storeBlob);
}
catch

View File

@@ -49,7 +49,6 @@
<form method="post" asp-controller="Stores" asp-action="UpdateWallet" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="@Model.CryptoCode">
<input asp-for="Config" type="hidden"/>
<input asp-for="Confirmation" type="hidden"/>
<input asp-for="DerivationScheme" type="hidden"/>
<input asp-for="AccountKey" type="hidden" />
<input asp-for="RootFingerprint" type="hidden" />
<input asp-for="KeyPath" type="hidden" />