set flag when creating a wallet
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/WalletNamePageViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/WalletNamePageViewModel.cs
@@ -100,6 +100,8 @@ public partial class WalletNamePageViewModel : RoutableViewModel
return walletGenerator.GenerateWallet(walletName, password);
});
+ km.IsNewlyCreated = true;
+
Navigate().To(new RecoveryWordsViewModel(km, mnemonic));
IsBusy = false;

MODIFY
WalletWasabi/Blockchain/Keys/KeyManager.cs
WalletWasabi/Blockchain/Keys/KeyManager.cs
@@ -55,7 +55,7 @@ public class KeyManager
MasterFingerprint = masterFingerprint;
ExtPubKey = Guard.NotNull(nameof(extPubKey), extPubKey);
- IsNewlyCreated = isNewlyCreated;
+ IsNewlyCreated = isNewlyCreated ?? false;
SetMinGapLimit(minGapLimit);
BlockchainState = blockchainState;
@@ -132,7 +132,7 @@ public class KeyManager
[JsonConverter(typeof(ExtPubKeyJsonConverter))]
public ExtPubKey ExtPubKey { get; }
- [JsonProperty(Order = 5)] public bool? IsNewlyCreated { get; private set; }
+ [JsonProperty(Order = 5)] public bool IsNewlyCreated { get; set; }
[JsonProperty(Order = 6)]
public int MinGapLimit { get; private set; }
@@ -266,9 +266,6 @@ public class KeyManager
}
}
- // Backwards compatibility:
- km.IsNewlyCreated ??= false;
-
return km;
}
@@ -413,12 +410,6 @@ public class KeyManager
}
}
- public void SetIsNewlyCreated()
- {
- IsNewlyCreated = false;
- ToFile();
- }
-
public IEnumerable<HdPubKey> GetKeys(KeyState? keyState = null, bool? isInternal = null)
{
if (keyState is null)

set flag when creating a wallet