Price reminder and init approval
* Start price reminder grain * Add config and init grain at startup * Save init wallet when already init
This commit is contained in:
@@ -333,6 +333,34 @@ public class AccountService : IAccountService
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<ExchangeApprovalStatus>> GetExchangeApprovalStatusAsync(User user)
|
||||
{
|
||||
var accounts = await GetAccountsByUserAsync(user, hideSecrets: true, getBalance: false);
|
||||
|
||||
var exchangeStatuses = new List<ExchangeApprovalStatus>();
|
||||
|
||||
foreach (var account in accounts)
|
||||
{
|
||||
exchangeStatuses.Add(new ExchangeApprovalStatus
|
||||
{
|
||||
Exchange = TradingExchanges.GmxV2,
|
||||
IsApproved = account.IsGmxInitialized
|
||||
});
|
||||
}
|
||||
|
||||
// Future: Add other exchanges here when supported
|
||||
// e.g.:
|
||||
// var hasEvmInitialized = accounts.Any(account =>
|
||||
// account.Exchange == TradingExchanges.Evm && account.IsGmxInitialized);
|
||||
// exchangeStatuses.Add(new ExchangeApprovalStatus
|
||||
// {
|
||||
// Exchange = TradingExchanges.Evm,
|
||||
// IsApproved = hasEvmInitialized
|
||||
// });
|
||||
|
||||
return exchangeStatuses;
|
||||
}
|
||||
|
||||
private async Task ManagePropertiesAsync(bool hideSecrets, bool getBalance, Account account)
|
||||
{
|
||||
if (account != null)
|
||||
|
||||
Reference in New Issue
Block a user