Can set derivation scheme for a specific crypto currency

This commit is contained in:
nicolas.dorier
2018-01-08 22:45:09 +09:00
parent 5910644cda
commit c3d37b1f78
8 changed files with 384 additions and 180 deletions

View File

@@ -11,21 +11,16 @@ namespace BTCPayServer.Models.StoreViewModels
{
public class StoreViewModel
{
class Format
public class DerivationScheme
{
public string Name { get; set; }
public string Crypto { get; set; }
public string Value { get; set; }
}
public StoreViewModel()
{
var btcPay = new Format { Name = "BTCPay", Value = "BTCPay" };
DerivationSchemeFormat = btcPay.Value;
DerivationSchemeFormats = new SelectList(new Format[]
{
btcPay,
new Format { Name = "Electrum", Value = "Electrum" },
}, nameof(btcPay.Value), nameof(btcPay.Name), btcPay);
}
public string Id { get; set; }
[Display(Name = "Store Name")]
[Required]
@@ -45,19 +40,7 @@ namespace BTCPayServer.Models.StoreViewModels
set;
}
public string DerivationScheme
{
get; set;
}
[Display(Name = "Derivation Scheme format")]
public string DerivationSchemeFormat
{
get;
set;
}
public SelectList DerivationSchemeFormats { get; set; }
public List<StoreViewModel.DerivationScheme> DerivationSchemes { get; set; } = new List<StoreViewModel.DerivationScheme>();
[Display(Name = "Payment invalid if transactions fails to confirm after ... minutes")]
[Range(10, 60 * 24 * 31)]
@@ -79,11 +62,6 @@ namespace BTCPayServer.Models.StoreViewModels
get; set;
}
public List<(string KeyPath, string Address)> AddressSamples
{
get; set;
} = new List<(string KeyPath, string Address)>();
public string StatusMessage
{
get; set;