I'll have to admit that your code is literally beautiful. Everything is organized and I can understand the functionalities of each file. Somehow, FinderOuter on Visual Studio 2019 goes really fast in contrast with my WinForms programs. Does it have to do with Avalonia? How did they manage to make it that light?
Thanks. I believe XAML is generally cleaner and faster for UI development but I'm not sure since I haven't really used WinForms myself.
Anyway, I got off topic. What I wanted to say is that by changing line 149 on ViewModels/MissingMnemonicViewModel.cs and line 1483 on Services/MnemonicSevice.cs it's not possible. For example line 1425 on Services/MnemonicSevice.cs returns me "Invalid mnemonic length." when I try to add more than one mnemonics:
The
FindMissing(..) in Service expects a single mnemonic, changing that is a lot of work so you should just change the ViewModel code to call it more than one time with each mnemonic instead of once
VM code turns into:
public async override void Find()
{
string[] mns = Mnemonic.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
foreach (var item in mns)
{
await MnService.FindMissing(item, MissingChar, PassPhrase, AdditionalInfo, SelectedInputType.Value,
KeyPath,
SelectedMnemonicType, SelectedWordListType,
SelectedElectrumMnType);
}
}
The
FindMissing(..) method has to return a task to be awaitable:
public async Task FindMissing(string mnemonic, char missChar, string pass, ....
And since
IReport.Init() on each call clears the message you have to change that so that on each call to
FindMissing() the new messages are added at the end.
https://github.com/Coding-Enthusiast/FinderOuter/blob/681225416796a926479c8d246fb7afbf1e34484c/Src/FinderOuter/Models/Report.cs#L60Message += $"{Environment.NewLine}Finished checking first input. Moving on to next.{Environment.NewLine}";
Now you can enter multiple mnemonics in mnemonic textbox in mnemonic recovery option separating them with a new line and each will be checked one after the other.