mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Remove the DerivationSchemeViewmodel.Enabled property
This commit is contained in:
@@ -191,7 +191,6 @@ namespace BTCPayServer.Tests
|
||||
{
|
||||
StoreId = StoreId,
|
||||
Method = importKeysToNBX ? WalletSetupMethod.HotWallet : WalletSetupMethod.WatchOnly,
|
||||
Enabled = true,
|
||||
CryptoCode = cryptoCode,
|
||||
Network = SupportedNetwork,
|
||||
RootFingerprint = GenerateWalletResponseV.AccountKeyPath.MasterFingerprint.ToString(),
|
||||
|
||||
@@ -157,7 +157,6 @@ namespace BTCPayServer.Controllers
|
||||
var configChanged = oldConfig != vm.Config;
|
||||
PaymentMethodId paymentMethodId = new PaymentMethodId(network.CryptoCode, PaymentTypes.BTCLike);
|
||||
var storeBlob = store.GetStoreBlob();
|
||||
var willBeExcluded = !vm.Enabled;
|
||||
|
||||
var showAddress = // Show addresses if:
|
||||
// - The user is clicking on continue after changing the config
|
||||
@@ -171,7 +170,7 @@ namespace BTCPayServer.Controllers
|
||||
if (strategy != null)
|
||||
await wallet.TrackAsync(strategy.AccountDerivation);
|
||||
store.SetSupportedPaymentMethod(paymentMethodId, strategy);
|
||||
storeBlob.SetExcluded(paymentMethodId, willBeExcluded);
|
||||
storeBlob.SetExcluded(paymentMethodId, false);
|
||||
storeBlob.Hints.Wallet = false;
|
||||
store.SetStoreBlob(storeBlob);
|
||||
}
|
||||
@@ -215,7 +214,6 @@ namespace BTCPayServer.Controllers
|
||||
vm.Config = derivation.ToJson();
|
||||
}
|
||||
|
||||
vm.Enabled = !store.GetStoreBlob().IsExcluded(new PaymentMethodId(vm.CryptoCode, PaymentTypes.BTCLike));
|
||||
vm.CanUseHotWallet = hotWallet;
|
||||
vm.CanUseRPCImport = rpcImport;
|
||||
vm.RootKeyPath = network.GetRootKeyPath();
|
||||
@@ -259,7 +257,6 @@ namespace BTCPayServer.Controllers
|
||||
Confirmation = string.IsNullOrEmpty(request.ExistingMnemonic),
|
||||
Network = network,
|
||||
RootKeyPath = network.GetRootKeyPath(),
|
||||
Enabled = !store.GetStoreBlob().IsExcluded(new PaymentMethodId(cryptoCode, PaymentTypes.BTCLike)),
|
||||
Source = "NBXplorer",
|
||||
DerivationSchemeFormat = "BTCPay",
|
||||
CanUseHotWallet = true,
|
||||
@@ -371,7 +368,6 @@ namespace BTCPayServer.Controllers
|
||||
vm.DerivationScheme = derivation.AccountDerivation.ToString();
|
||||
vm.KeyPath = derivation.GetSigningAccountKeySettings().AccountKeyPath?.ToString();
|
||||
vm.Config = derivation.ToJson();
|
||||
vm.Enabled = !store.GetStoreBlob().IsExcluded(new PaymentMethodId(vm.CryptoCode, PaymentTypes.BTCLike));
|
||||
vm.IsHotWallet = isHotWallet;
|
||||
|
||||
return View(vm);
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace BTCPayServer.Models.StoreViewModels
|
||||
[Display(Name = "Root fingerprint")]
|
||||
public string RootFingerprint { get; set; }
|
||||
public bool Confirmation { get; set; }
|
||||
public bool Enabled { get; set; } = true;
|
||||
|
||||
public KeyPath RootKeyPath { get; set; }
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
<input asp-for="Config" type="hidden"/>
|
||||
<input asp-for="Confirmation" type="hidden"/>
|
||||
<input asp-for="DerivationScheme" type="hidden"/>
|
||||
<input asp-for="Enabled" type="hidden"/>
|
||||
|
||||
<div class="form-group">
|
||||
<table class="table table-sm table-responsive-md">
|
||||
|
||||
Reference in New Issue
Block a user