use managed notifications for coin received.
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -28,6 +28,7 @@ using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.CoinJoin.Client.Clients;
using WalletWasabi.Crypto;
using WalletWasabi.Gui.Dialogs;
+using WalletWasabi.Gui.Helpers;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Helpers;
using WalletWasabi.Hwi.Models;
@@ -548,33 +549,20 @@ namespace WalletWasabi.Gui
}
private void CoinReceived(object sender, SmartCoin coin)
- {
- try
{
if (coin.HdPubKey.IsInternal)
{
return;
}
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || UiConfig?.LurkingWifeMode is true)
+ if (UiConfig?.LurkingWifeMode is true)
{
return;
}
string amountString = coin.Amount.ToString(false, true);
- using var process = Process.Start(new ProcessStartInfo
- {
- FileName = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "osascript" : "notify-send",
- Arguments = RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
- ? $"-e \"display notification \\\"Received {amountString} BTC\\\" with title \\\"Wasabi\\\"\""
- : $"--expire-time=3000 \"Wasabi\" \"Received {amountString} BTC\"",
- CreateNoWindow = true
- });
- }
- catch (Exception ex)
- {
- Logger.LogWarning(ex);
- }
+
+ NotificationHelpers.Information($"{amountString} BTC", "Received");
}
public async Task DisposeInWalletDependentServicesAsync()

use managed notifications for coin received.