Remove preloading from KeyChain
MODIFY
WalletWasabi/WabiSabi/Client/KeyChain.cs
WalletWasabi/WabiSabi/Client/KeyChain.cs
@@ -19,21 +19,10 @@ public class KeyChain : BaseKeyChain
}
private KeyManager KeyManager { get; }
- private ExtKey? MasterKey { get; set; }
-
- [MemberNotNull(nameof(MasterKey))]
- public void PreloadMasterKey()
- {
- MasterKey = KeyManager.GetMasterExtKey(Kitchen.SaltSoup());
- }
protected override Key GetMasterKey()
{
- if (MasterKey is null)
- {
- PreloadMasterKey();
- }
- return MasterKey.PrivateKey;
+ return KeyManager.GetMasterExtKey(Kitchen.SaltSoup()).PrivateKey;
}
public override void TrySetScriptStates(KeyState state, IEnumerable<Script> scripts)

MODIFY
WalletWasabi/Wallets/Wallet.cs
WalletWasabi/Wallets/Wallet.cs
@@ -152,11 +152,6 @@ public class Wallet : BackgroundService, IWallet
Kitchen.Cook(compatibilityPasswordUsed ?? Guard.Correct(password));
}
- if (IsLoggedIn && KeyChain is KeyChain keychain)
- {
- keychain.PreloadMasterKey();
- }
-
return IsLoggedIn;
}

Remove preloading from KeyChain