Update SDK (#35)
* Update SDK for swap * Fix web3proxy build * Update types * Fix swap * Send token test and BASE transfer * fix cache and hook * Fix send * Update health check with uiFeereceiver * Fix sdk * Fix get positions * Fix timeoutloop * Fix open position * Fix closes positions * Review
This commit is contained in:
@@ -25,9 +25,21 @@ public class MessengerService : IMessengerService
|
||||
await _discordService.SendClosedPosition(address, oldTrade);
|
||||
}
|
||||
|
||||
public async Task SendClosingPosition(Position position)
|
||||
public void SendClosingPosition(Position position)
|
||||
{
|
||||
await _discordService.SendClosingPosition(position);
|
||||
// Fire-and-forget: Send closing position notification without blocking the thread
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
await _discordService.SendClosingPosition(position);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Log the exception but don't let it affect the main thread
|
||||
Console.WriteLine($"Failed to send closing position notification: {ex.Message}");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public async Task SendIncreasePosition(string address, Trade trade, string copyAccountName, Trade? oldTrade = null)
|
||||
|
||||
Reference in New Issue
Block a user