Add agentbalance

This commit is contained in:
2025-08-15 19:35:01 +07:00
parent f58d1cea3b
commit cd93dede4e
11 changed files with 100 additions and 18 deletions

View File

@@ -173,13 +173,14 @@ public class AccountService : IAccountService
return GetAccountsByUserAsync(user, hideSecrets).Result;
}
public async Task<IEnumerable<Account>> GetAccountsByUserAsync(User user, bool hideSecrets = true)
public async Task<IEnumerable<Account>> GetAccountsByUserAsync(User user, bool hideSecrets = true,
bool getBalance = false)
{
var cacheKey = $"user-account-{user.Name}";
// For now, we'll get fresh data since caching async operations requires more complex logic
// This can be optimized later with proper async caching
return await GetAccountsAsync(user, hideSecrets, false);
return await GetAccountsAsync(user, hideSecrets, getBalance);
}
private async Task<IEnumerable<Account>> GetAccountsAsync(User user, bool hideSecrets, bool getBalance)