Fix master key
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
@@ -47,10 +47,10 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
try
{
Password = Guard.Correct(Password);
- var secret = KeyManager.EncryptedSecret.GetSecret(Password);
+ var secret = KeyManager.GetExtKey(Password);
Password = "";
- SetSecret(secret.ToWif());
+ SetSecret(secret.GetWif(Global.Network).ToWif());
}
catch (Exception ex)
{

MODIFY
WalletWasabi/KeyManagement/KeyManager.cs
WalletWasabi/KeyManagement/KeyManager.cs
@@ -292,16 +292,7 @@ namespace WalletWasabi.KeyManagement
public IEnumerable<(ExtKey secret, HdPubKey pubKey)> GetSecretsAndPubKeyPairs(string password, params Script[] scripts)
{
- Key secret;
- try
- {
- secret = EncryptedSecret.GetKey(password);
- }
- catch (SecurityException ex)
- {
- throw new SecurityException("Invalid password.", ex);
- }
- var extKey = new ExtKey(secret, ChainCode);
+ ExtKey extKey = GetExtKey(password);
var extKeysAndPubs = new List<(ExtKey secret, HdPubKey pubKey)>();
lock (HdPubKeysLock)
@@ -319,6 +310,19 @@ namespace WalletWasabi.KeyManagement
}
}
+ public ExtKey GetExtKey(string password)
+ {
+ try
+ {
+ Key secret = EncryptedSecret.GetKey(password);
+ return new ExtKey(secret, ChainCode);
+ }
+ catch (SecurityException ex)
+ {
+ throw new SecurityException("Invalid password.", ex);
+ }
+ }
+
/// <summary>
/// Make sure there's always clean keys generated and indexed.
/// </summary>

Fix master key