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

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

Build:
DEFAULT BRANCH: main
Ran 12 Nov 2025 01:01PM UTC
Jobs 2
Files 1016
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

12 Nov 2025 12:59PM UTC coverage: 90.171% (-0.9%) from 91.072%
19298270154

push

github

web-flow
feature(portfolio): Add Portfolio Endpoint with Zerion Support (#2755)

* feat(portfolio): add domain entities and configuration

Add core portfolio domain entities to represent wallet holdings:
- Portfolio: container for token balances and app positions with totals
- TokenBalance: wallet tokens with price and balance info
- AppBalance: DeFi positions grouped by application
- AppPosition: individual positions within apps

Add configuration for Zerion API integration with cache TTL and
dust filtering threshold. Portfolio provider enum supports Zerion only.

Test builders included for all entities following project Builder pattern.

* feat(portfolio): add Zerion API integration

Implement Zerion API client to fetch portfolio positions including
wallet token balances and DeFi app positions.

Features:
- Fetch positions with currency conversion support
- Network-to-chain ID mapping for 50+ chains
- Filter non-displayable and trash positions
- Transform Zerion API response to domain entities
- Group app positions by application
- Support trusted tokens filter

Integration includes comprehensive error handling and Zod schema
validation for API responses. Updated Zerion balance schemas to
support relationships and flags fields.

* feat(portfolio): add repository with caching and filtering

Implement portfolio repository as the main business logic layer
with caching strategy and position filtering capabilities.

Caching:
- Simple single-cache strategy for complete portfolio data
- Configurable TTL for cache expiration
- Per-address and per-currency cache keys

Filtering:
- Chain filter: limit results to specific chain IDs
- Trusted filter: only verified tokens
- Dust filter: exclude positions below $1 USD threshold
- Automatic total recalculation after filtering

Repository integrates with Zerion API and handles cache management
transparently. Cache can be cleared per address via clearPortfolio.

* feat(portfolio): add REST API endpoint

Expose portfolio func... (continued)

2844 of 3530 branches covered (80.57%)

Branch coverage included in aggregate %.

266 of 379 new or added lines in 34 files covered. (70.18%)

1 existing line in 1 file now uncovered.

13797 of 14925 relevant lines covered (92.44%)

620.32 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
96.74
-0.42% src/datasources/cache/cache.router.ts
1
16.67
0.17% src/datasources/positions-api/zerion-positions-api.service.ts
2
66.67
src/modules/portfolio/domain/portfolio.service.ts
5
0.0
src/modules/portfolio/datasources/__tests__/test.portfolio-api.module.ts
104
10.96
src/modules/portfolio/datasources/zerion-portfolio-api.service.ts

Uncovered Existing Lines

Lines Coverage ∆ File
1
84.62
-0.85% src/domain/relay/relayers/no-fee-campaign.relayer.ts
Jobs
ID Job ID Ran Files Coverage
1 run-unit-tests - 19298270154.1 12 Nov 2025 01:06PM UTC 1970
88.64
GitHub Action Run
2 run-integration-tests - 19298270154.2 12 Nov 2025 01:01PM UTC 1897
53.7
GitHub Action Run
Source Files on build 19298270154
  • Tree
  • List 1016
  • Changed 273
  • Source Changed 9
  • Coverage Changed 272
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #19298270154
  • bdd53b33 on github
  • Prev Build on main (#19165266509)
  • Next Build on main (#19335648772)
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