public async Task <BalanceModel> GetBalanceAsync(string walletAddress) { var balance = await _balancesService.GetAsync(walletAddress); return(new BalanceModel { Amount = balance }); }
public async Task <IReadOnlyList <BalanceModel> > GetAsync() { try { return(Mapper.Map <IReadOnlyList <BalanceModel> >(await _balancesService.GetAsync())); } catch (FailedOperationException exception) { _log.Error(exception); throw new ValidationApiException(HttpStatusCode.BadRequest, exception.Message); } }