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

KarpelesLab / libwallet / 25864401376
24%

Build:
DEFAULT BRANCH: master
Ran 14 May 2026 02:10PM UTC
Jobs 1
Files 118
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

14 May 2026 02:01PM UTC coverage: 21.657% (+0.07%) from 21.591%
25864401376

push

github

MagicalTux
wltasset: add Asset.IsNative / Asset.TokenAddress helpers

Hosts have been inventing native-vs-token matchers — branching on
Asset.type ("native" — which libwallet has never emitted; it's always
"fungible" for runtime balance entries), Asset.symbol (collides; an
ERC-20 can ship as "ETH" too), or Asset.name (localised). None are
reliable. The single invariant signal is the ".NATIVE" suffix on
Asset.key — and that's been the convention since the initial commit.

Wrap it as a method so hosts don't reinvent the predicate:

  // Go
  asset.IsNative()      // true when Key ends with ".NATIVE"
  asset.TokenAddress()  // mint/contract part, or "" for native

  // Dart (matching shape)
  asset.isNative        // bool getter
  asset.tokenAddress    // String? — null for native

Both receivers safe on nil/empty. Tests cover the native suffixes,
the token addresses (EVM 0x + Solana base58), and the edge cases
where ".NATIVE" appears as a substring rather than the trailing
segment (must use HasSuffix, not Contains).

Also fixes the misleading Asset.type doc on the Dart side that
listed "native" / "erc20" / "spl-token" as values — that list was
aspirational; the runtime value is always "fungible".

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

14 of 14 new or added lines in 1 file covered. (100.0%)

3565 of 16461 relevant lines covered (21.66%)

113.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25864401376.1 14 May 2026 02:10PM UTC 118
21.66
GitHub Action Run
Source Files on build 25864401376
  • Tree
  • List 118
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25864401376
  • e2802c5f on github
  • Prev Build on master (#25854519816)
  • Next Build on master (#25898429022)
  • 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