Move Terms and Conditions to GUI
MODIFY
WalletWasabi.Gui/Rpc/WasabiJsonRpcService.cs
WalletWasabi.Gui/Rpc/WasabiJsonRpcService.cs
@@ -43,7 +43,6 @@ namespace WalletWasabi.Gui.Rpc
public object CreateWallet(string walletName, string password)
{
var walletGenerator = new WalletGenerator(Global.WalletsDir, Global.Network);
- walletGenerator.TermsAccepted = true; // Global.WalletService is {};
walletGenerator.TipHeight = Global.BitcoinStore.SmartHeaderChain.TipHeight;
var (keyManager, mnemonic) = walletGenerator.GenerateWallet(walletName, password);
keyManager.ToFile();

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
@@ -46,8 +46,12 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
{
try
{
+ if (!TermsAccepted)
+ {
+ throw new InvalidOperationException("Terms are not accepted.");
+ }
+
var walletGenerator = new WalletGenerator(Global.WalletsDir, Global.Network);
- walletGenerator.TermsAccepted = TermsAccepted;
walletGenerator.TipHeight = Global.BitcoinStore.SmartHeaderChain.TipHeight;
var (km, mnemonic) = walletGenerator.GenerateWallet(WalletName, Password);
Owner.CurrentView = new GenerateWalletSuccessViewModel(Owner, km, mnemonic);

MODIFY
WalletWasabi/Blockchain/Keys/WalletGenerator.cs
WalletWasabi/Blockchain/Keys/WalletGenerator.cs
@@ -24,7 +24,6 @@ namespace WalletWasabi.Blockchain.Keys
public string WalletsDir { get; private set; }
public Network Network { get; private set; }
- public bool TermsAccepted { get; set; }
public uint TipHeight { get; set; }
public (KeyManager, Mnemonic) GenerateWallet(string walletName, string password)
@@ -34,11 +33,6 @@ namespace WalletWasabi.Blockchain.Keys
throw new ArgumentException("Invalid wallet name.");
}
- if (!TermsAccepted)
- {
- throw new InvalidOperationException("Terms are not accepted.");
- }
-
string walletFilePath = Path.Combine(WalletsDir, $"{walletName}.json");
if (File.Exists(walletFilePath))
{

Move Terms and Conditions to GUI