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

KarpelesLab / libwallet / 27014048686
22%

Build:
DEFAULT BRANCH: master
Ran 05 Jun 2026 12:12PM UTC
Jobs 1
Files 126
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

05 Jun 2026 12:10PM UTC coverage: 22.416% (+0.5%) from 21.912%
27014048686

push

github

MagicalTux
transfer: resolve tx.Asset and route SPL/ERC-20 internally + bump 0.4.53

`Transaction.type = "transfer"` was supposed to mean "send this
asset" but the Solana sign path ignored tx.Type entirely and built
a native SOL transfer regardless. A USDT transfer became a SOL
transfer with the token base-units sent as lamports — 1.315764
USDT (1_315_764 base units) became ~0.00132 SOL.

This change lifts asset resolution into Validate and dispatches
every chain family from there.

Validate (wlttx/transaction.go):
- New resolveTokenAsset() looks up tx.Asset against the local
  Token table; native (empty / "NATIVE" / "*.NATIVE") returns nil,
  tokens return the row, anything else errors.
- The resolved row gets stashed on tx.resolvedToken (unexported,
  not persisted) so signAndSend doesn't repeat the lookup.
- Bitcoin: any non-native asset rejected. There are no
  contract-level assets on bitcoin-family chains.
- EVM: tx.Type = "transfer" + an ERC-20 asset auto-routes through
  the existing ERC-20 path (tx.To = contract, tx.Data = encoded
  transfer()). Explicit "erc20_transfer" still works.
- Solana: native-send preflight only fires when the resolved token
  is nil. Token-2022 mints rejected with a clear error until
  the next bump adds opcode + extension handling.

Solana SPL Token-1 (wlttx/solana_spl.go):
- ATA derivation via the Solana PDA algorithm — sha256 of
  [owner, token_program, mint, bump, ata_program,
  "ProgramDerivedAddress"], counting down from bump=255 until the
  result is OFF the ed25519 curve. filippo.io/edwards25519's
  Point.SetBytes provides the on-curve oracle.
- SPL TransferChecked (opcode 12, u64 amount, u8 decimals) built
  byte-for-byte. TransferChecked over plain Transfer because the
  program verifies decimals against the mint, catching stale
  off-chain decimals before they cost the user wrong amounts.
- ATA CreateIdempotent (opcode 1) attached unconditionally so the
  recipient's ATA is provisioned in-tx when missing and the
  in... (continued)

143 of 240 new or added lines in 3 files covered. (59.58%)

4188 of 18683 relevant lines covered (22.42%)

102.48 hits per line

Uncovered Changes

Lines Coverage ∆ File
48
35.79
-6.19% wlttx/solana.go
44
0.0
0.0% wlttx/transaction.go
5
96.62
wlttx/solana_spl.go
Jobs
ID Job ID Ran Files Coverage
1 27014048686.1 05 Jun 2026 12:12PM UTC 126
22.42
GitHub Action Run
Source Files on build 27014048686
  • Tree
  • List 126
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27014048686
  • c202078c on github
  • Prev Build on master (#27005237997)
  • Next Build on master (#27018188820)
  • 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