2021-02-11 11:48:54 +01:00
|
|
|
namespace BTCPayServer.Models.StoreViewModels
|
|
|
|
{
|
|
|
|
public enum WalletSetupMethod
|
|
|
|
{
|
|
|
|
ImportOptions,
|
|
|
|
Hardware,
|
|
|
|
File,
|
|
|
|
Xpub,
|
|
|
|
Scan,
|
|
|
|
Seed,
|
|
|
|
GenerateOptions,
|
|
|
|
HotWallet,
|
|
|
|
WatchOnly
|
|
|
|
}
|
|
|
|
|
|
|
|
public class WalletSetupViewModel : DerivationSchemeViewModel
|
|
|
|
{
|
|
|
|
public WalletSetupMethod? Method { get; set; }
|
2021-06-18 03:25:17 +02:00
|
|
|
public WalletSetupRequest SetupRequest { get; set; }
|
2021-02-11 11:48:54 +01:00
|
|
|
public string StoreId { get; set; }
|
2021-03-01 12:43:25 +01:00
|
|
|
public bool IsHotWallet { get; set; }
|
2021-02-11 11:48:54 +01:00
|
|
|
|
|
|
|
public string ViewName =>
|
|
|
|
Method switch
|
|
|
|
{
|
|
|
|
WalletSetupMethod.ImportOptions => "ImportWalletOptions",
|
|
|
|
WalletSetupMethod.Hardware => "ImportWallet/Hardware",
|
|
|
|
WalletSetupMethod.Xpub => "ImportWallet/Xpub",
|
|
|
|
WalletSetupMethod.File => "ImportWallet/File",
|
|
|
|
WalletSetupMethod.Scan => "ImportWallet/Scan",
|
|
|
|
WalletSetupMethod.Seed => "ImportWallet/Seed",
|
|
|
|
WalletSetupMethod.GenerateOptions => "GenerateWalletOptions",
|
|
|
|
WalletSetupMethod.HotWallet => "GenerateWallet",
|
|
|
|
WalletSetupMethod.WatchOnly => "GenerateWallet",
|
|
|
|
_ => "SetupWallet"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|