Files
Walleby/Wallet/CloseWalletHandler.cs
T
TheXamlGuy bc5023c8ac Bug fixes
2024-07-05 21:57:01 +01:00

20 lines
563 B
C#

using Microsoft.EntityFrameworkCore;
using Toolkit.Foundation;
using Wallet.Data;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
namespace Wallet;
public class CloseWalletHandler(IDecoratorService<WalletConnection> walletConnectionDecorator,
IDbContextFactory<WalletContext> dbContextFactory) :
IHandler<CloseEventArgs<Wallet>, bool>
{
public async Task<bool> Handle(CloseEventArgs<Wallet> args,
CancellationToken cancellationToken)
{
walletConnectionDecorator.Set(null);
return true;
}
}