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

safe-global / safe-client-gateway / 22575202721

02 Mar 2026 12:04PM UTC coverage: 89.404% (+0.06%) from 89.345%
22575202721

push

github

web-flow
fix: resolve portfolio cache key collision between two Zerion endpoints (#2946)

* fix: resolve portfolio cache key collision between two Zerion endpoints

PortfolioRepository and ZerionWalletPortfolioApi were sharing the same
cache key but storing different data structures. When the Safe overview
populated the cache first, the portfolio endpoint would read it and fail
Zod validation (expected string/array, received undefined).

- Add getZerionWalletPortfolioCacheDir for /v1/wallets/{address}/portfolio
- Keep getPortfolioCacheDir for /v1/wallets/{address}/positions
- Update ZerionWalletPortfolioApi to use the new cache key

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor: remove excludeSpam from ZerionWalletPortfolioApi

Co-authored-by: Cursor <cursoragent@cursor.com>

* test: add cache key tests, normalize portfolio fiatCode to lowercase

Made-with: Cursor

* chore: add SPDX license header to modified files

Made-with: Cursor

* chore: add SPDX license header to chains.repository.ts

Made-with: Cursor

---------

Co-authored-by: Cursor <cursoragent@cursor.com>

3000 of 3798 branches covered (78.99%)

Branch coverage included in aggregate %.

7 of 7 new or added lines in 2 files covered. (100.0%)

32 existing lines in 6 files now uncovered.

14499 of 15775 relevant lines covered (91.91%)

533.29 hits per line

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

93.88
/src/datasources/network/network.module.ts


Source Not Available

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