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

safe-global / safe-client-gateway / 29093934544
87%

Build:
DEFAULT BRANCH: main
Ran 10 Jul 2026 12:53PM UTC
Jobs 2
Files 915
Run time 2min
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

10 Jul 2026 12:50PM UTC coverage: 86.92% (+0.03%) from 86.892%
29093934544

push

github

web-flow
feat: invalidate Zerion caches on Safe transaction events and manual refresh (#3241)

* feat: invalidate Zerion caches on Safe transaction events

On-chain events (transfers, executed multisig/module transactions,
Safe creation) now clear the Zerion wallet-portfolio, portfolio-route
and positions caches for the affected Safe, and flag the address so
the next Zerion fetch on any of those paths uses sync=true. Clearing
alone would re-cache Zerion's pre-event snapshot; the flag makes the
first post-event fetch wait for Zerion's re-aggregation and is consumed
by whichever endpoint syncs first. The flag lives for
max(ZERION_WALLET_PORTFOLIO_TTL_SECONDS, ZERION_SYNC_FLAG_MIN_SECONDS)
so it outlives Zerion's re-aggregation lag even with a short cache TTL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: log portfolio cache invalidation at debug level

Fires per on-chain event, so info-level would flood Datadog.

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

* refactor: replace sync-flag machinery with a single ZerionCacheService

Zerion deprecated the `sync` query parameter, so the event-driven sync flag
(per-address token, sync=true on the next fetch, consume-on-success) no longer
has a backend to drive. What remains needed is global invalidation of the
Zerion-backed caches.

- Add `ZerionCacheService.invalidate(address, source)`: clears the three
  Zerion-backed caches (wallet portfolio, portfolio route, positions) together
  and logs a PORTFOLIO_CACHE_INVALIDATED entry with the trigger source
- Route both triggers through it: the seven on-chain event handlers
  (source = event type) and the manual `DELETE /portfolio/:address` refresh
  (source = 'refresh'), which previously cleared only the portfolio-route cache
- Remove the sync-flag machinery: check/markSynced, the flag cache key, the
  `ZERION_SYNC_FLAG_MIN_SECONDS` env var, and the flag-driven `sync=true`
  fetches (the client-facing `?sync=true` param is u... (continued)

3689 of 4512 branches covered (81.76%)

Branch coverage included in aggregate %.

15 of 16 new or added lines in 6 files covered. (93.75%)

2 existing lines in 2 files now uncovered.

9608 of 10786 relevant lines covered (89.08%)

537.74 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
33.33
0.0% src/modules/portfolio/domain/portfolio.service.ts

Coverage Regressions

Lines Coverage ∆ File
1
75.29
1.73% src/modules/positions/datasources/zerion-positions-api.service.ts
1
0.0
0.0% src/modules/positions/domain/positions.repository.ts
Jobs
ID Job ID Ran Files Coverage
1 run-integration-tests - 29093934544.1 10 Jul 2026 12:56PM UTC 915
62.98
GitHub Action Run
2 run-unit-tests - 29093934544.2 10 Jul 2026 12:53PM UTC 915
61.61
GitHub Action Run
Source Files on build 29093934544
  • Tree
  • List 915
  • Changed 13
  • Source Changed 12
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29093934544
  • 1661e589 on github
  • Prev Build on main (#29086913649)
  • Next Build on main (#29098733402)
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