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

KarpelesLab / libwallet / 24433984516
25%

Build:
DEFAULT BRANCH: master
Ran 15 Apr 2026 03:03AM UTC
Jobs 1
Files 80
Run time 1min
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

15 Apr 2026 02:55AM UTC coverage: 21.803% (-0.2%) from 22.012%
24433984516

push

github

MagicalTux
background balance polling (60 s, lifecycle-aware)

Adds a per-env goroutine that polls the current account + network
balances every 60 s and broadcasts a `balances_changed` event when
anything differs from the previous snapshot. Replaces the "call
assets.list() every 60 s manually from the host" pattern — frontends
can now bind to the stream and refresh reactively.

Go:
- Extracted currentAssets(e, net, acct) helper in wltbase/asset.go
  so the poller + the existing Asset:list endpoint share one code
  path.
- New wltbase/balance_poll.go: balancePoller struct, pause/resume/
  Nudge methods, and a run loop keyed on a 60-s ticker + kick chan.
  Started from env.init() alongside the cache-cleanup loop.
- Lifecycle:update now pauses the poller on `background` / `paused`
  and resumes on `foreground` / `resumed` / `active`. Resume kicks
  an immediate poll so the UI reflects anything that happened while
  backgrounded (incoming tx, price tick, etc.).
- Diff key: "<acctId>/<netId>" + per-asset Key → Amount.String().
  Network or account switch forces a broadcast on the next poll so
  the UI isn't stuck on stale balances.

Dart:
- New BalancesChangedEvent (sealed subclass of LibwalletEvent) with
  typed getters: network, account, assets.
- client.balanceChanges stream filters events to BalancesChangedEvent.
- Barrel export updated.

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

0 of 117 new or added lines in 4 files covered. (0.0%)

4 existing lines in 2 files now uncovered.

2109 of 9673 relevant lines covered (21.8%)

2.61 hits per line

Uncovered Changes

Lines Coverage ∆ File
81
0.0
wltbase/balance_poll.go
24
14.75
0.0% wltbase/asset.go
6
36.81
-1.6% wltbase/env.go
6
27.27
-22.73% wltbase/lifecycle.go

Coverage Regressions

Lines Coverage ∆ File
3
14.75
0.0% wltbase/asset.go
1
36.81
-1.6% wltbase/env.go
Jobs
ID Job ID Ran Files Coverage
1 24433984516.1 15 Apr 2026 03:03AM UTC 80
21.8
GitHub Action Run
Source Files on build 24433984516
  • Tree
  • List 80
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24433984516
  • f8b249c2 on github
  • Prev Build on master (#24433790125)
  • Next Build on master (#24435361820)
  • Delete
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