prevent dup wallets

This commit is contained in:
TheXamlGuy
2024-07-23 18:20:58 +01:00
parent 8e0f1e6715
commit f30ee9fe70
4 changed files with 49 additions and 28 deletions
+3 -3
View File
@@ -42,9 +42,9 @@ public partial class OpenWalletViewModel :
{
using (await new ActivityLock(this))
{
if (await Validation.Validate(() => Password, [new ValidationRule(async () =>
await Mediator.Handle<OpenEventArgs<Wallet<string>>, bool>(Open.As(new Wallet<string>(Password))),
"The password is incorrect, please try again.")]))
bool result = await Mediator.Handle<OpenEventArgs<Wallet<string>>, bool>(Open.As(new Wallet<string>(Password)));
if (await Validation.Validate(() => Password, [new ValidationRule(() => result,
"The password is incorrect, please try again.")]))
{
Publisher.Publish(Opened.As<Wallet>());
}