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

safe-global / safe-client-gateway / 21212314323
89%

Build:
DEFAULT BRANCH: main
Ran 21 Jan 2026 02:01PM UTC
Jobs 2
Files 1021
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Jan 2026 01:58PM UTC coverage: 89.791% (+1.0%) from 88.801%
21212314323

push

github

web-flow
refactor(zerion): improve ZerionChainMappingService with Symbol DI and optimized caching (#2869)

* refactor(zerion): add interface, Symbol DI, and optimize cache for chain mapping

Refactor ZerionChainMappingService with several improvements:

Interface and Dependency Injection:
- Export IZerionChainMappingService interface with JSDoc documentation
- Export Symbol for dependency injection token
- Update module to provide service via Symbol
- Rename methods to getNetworkNameFromChainId/getChainIdFromNetworkName

Cache Optimization:
- Combine both mapping directions (chainIdToName, nameToChainId) into
  a single cache entry, reducing from 4 keys to 2 (mainnet + testnet)
- Simplify getZerionChainsCacheDir() by removing direction parameter
- Make cache TTL configurable via ZERION_CHAINS_CACHE_TTL_SECONDS
  (defaults to 86400 seconds / 24 hours)

Error Handling:
- Return null instead of undefined for not-found cases
- Log errors when chain fetch fails, return empty mappings gracefully

This follows codebase patterns for Symbol-based injection and provides
a cleaner API for consumers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(balances): use ZerionChainMappingService via Symbol injection

Update zerion-balances-api to use the refactored chain mapping service:

- Inject IZerionChainMappingService via Symbol
- Import ZerionModule in BalancesModule
- Return empty array when chain is not supported (graceful handling)
- Add debug logging when skipping balances for unsupported chains

Previously, unsupported chains could cause errors. Now the service
gracefully returns an empty result with appropriate logging, making
it easier to diagnose chain support issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(zerion): use ZerionChainMappingService in positions and portfolio

Apply the same refactoring pattern to remaining Zerion API consumers:

- Inject IZerionChainMappingService via Symbol in both services
- Skip pos... (continued)

3006 of 3704 branches covered (81.16%)

Branch coverage included in aggregate %.

50 of 53 new or added lines in 7 files covered. (94.34%)

14021 of 15259 relevant lines covered (91.89%)

592.22 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
37.22
-5.82% src/modules/balances/datasources/zerion-balances-api.service.ts
Jobs
ID Job ID Ran Files Coverage
1 run-unit-tests - 21212314323.1 21 Jan 2026 02:05PM UTC 1924
85.98
GitHub Action Run
2 run-integration-tests - 21212314323.2 21 Jan 2026 02:01PM UTC 1913
53.84
GitHub Action Run
Source Files on build 21212314323
  • Tree
  • List 1021
  • Changed 287
  • Source Changed 9
  • Coverage Changed 287
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #21212314323
  • ce6d764e on github
  • Prev Build on main (#21205288723)
  • Next Build on main (#21219408235)
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

© 2026 Coveralls, Inc