• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 8093846263

29 Feb 2024 09:32AM UTC coverage: 93.246% (-0.4%) from 93.665%
8093846263

push

github

web-flow
Add `trusted` query param. to `incoming-transfers` endpoint (#1214)

This adds a `trusted` query param. to the `incoming-transfers` endpoints, mirroring that of the `history` endpoint. If `true`, it filters ERC-20 transfers that are untrusted.

1661 of 1999 branches covered (83.09%)

Branch coverage included in aggregate %.

17 of 17 new or added lines in 3 files covered. (100.0%)

26 existing lines in 10 files now uncovered.

6126 of 6352 relevant lines covered (96.44%)

341.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

56.25
/src/datasources/cache/cache.module.ts
1
import { Global, Module } from '@nestjs/common';
68✔
2
import { createClient } from 'redis';
68✔
3
import { IConfigurationService } from '@/config/configuration.service.interface';
68✔
4
import { CacheService } from '@/datasources/cache/cache.service.interface';
68✔
5
import { RedisCacheService } from '@/datasources/cache/redis.cache.service';
68✔
6
import { CacheReadiness } from '@/domain/interfaces/cache-readiness.interface';
68✔
7
import { ILoggingService, LoggingService } from '@/logging/logging.interface';
68✔
8
import { CacheKeyPrefix } from '@/datasources/cache/constants';
68✔
9

10
export type RedisClientType = ReturnType<typeof createClient>;
11

12
async function redisClientFactory(
13
  configurationService: IConfigurationService,
14
  loggingService: ILoggingService,
15
): Promise<RedisClientType> {
UNCOV
16
  const redisHost = configurationService.getOrThrow<string>('redis.host');
×
UNCOV
17
  const redisPort = configurationService.getOrThrow<string>('redis.port');
×
UNCOV
18
  const client: RedisClientType = createClient({
×
19
    url: `redis://${redisHost}:${redisPort}`,
20
  });
UNCOV
21
  client.on('error', (err) =>
×
22
    loggingService.error(`Redis client error: ${err}`),
×
23
  );
UNCOV
24
  await client.connect();
×
UNCOV
25
  return client;
×
26
}
27

28
@Global()
29
@Module({
30
  providers: [
31
    {
32
      provide: 'RedisClient',
33
      useFactory: redisClientFactory,
34
      inject: [IConfigurationService, LoggingService],
35
    },
36
    { provide: CacheService, useClass: RedisCacheService },
37
    { provide: CacheReadiness, useExisting: CacheService },
38
    { provide: CacheKeyPrefix, useValue: '' },
39
  ],
40
  exports: [CacheService, CacheReadiness],
41
})
42
export class CacheModule {}
68✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc