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:
Oda
2025-09-17 14:28:56 +07:00
committed by GitHub
parent 271dd70ad7
commit cee3902a4d
91 changed files with 21375 additions and 2831 deletions

View File

@@ -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)