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