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

KarpelesLab / libwallet / 26338357447
22%

Build:
DEFAULT BRANCH: master
Ran 23 May 2026 04:56PM UTC
Jobs 1
Files 123
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

23 May 2026 04:54PM UTC coverage: 22.08% (-0.01%) from 22.094%
26338357447

push

github

MagicalTux
wltswap/okx: migrate adapter to OKX DEX aggregator API V6

OKX deprecated V5 on the day 0.4.41 shipped, so every
Crypto/Okx:quote round trip began returning HTTP 50050
("V5 API is being deprecated") and surfaced to the host as
`OKX: provider_unavailable`. Reported as a user-visible failure
on SOL→EURC; the failure mode was actually universal across every
chain + pair.

The platform's Crypto/Okx:* proxy was rewritten against
/api/v6/dex/aggregator/...; libwallet catches up here:

  - request param `chainId` → `chainIndex` on /quote, /swap,
    /approveTransaction;
  - /quote no longer accepts a slippage parameter (V6 applies
    slippage only at /swap);
  - /swap param `slippage` (fraction, 0.005) → `slippagePercent`
    (percent, 0.5);
  - response field `chainId` → `chainIndex` on every entry;
  - response field `priceImpactPercentage` → `priceImpactPercent`;
  - response field `slippage` on `tx` → `slippagePercent`, plus
    new `maxSpendAmount`;
  - `dexRouterList` flattened — the V5 nested
    router/routerPercent/subRouterList/dexProtocol[] tree collapsed
    to a flat list of per-hop entries, each carrying a single
    dexProtocol object plus its hop's from/to token decoration.
    Route builder walks entries in order and emits one RouteHop per
    entry; per-hop symbols come from each entry's own tokens.

End-to-end verified against the live Crypto/Okx:quote on Solana
mainnet (SOL→EURC returns a real 5-hop route, no longer 50050).

Also: distinguish "OKX returned an empty `[{}]` route" from
"non-empty toTokenAmount that fails to parse" — the former now
maps to no_liquidity (with the request echo in the message) so
the host UI downgrades it to an advisory.

CHANGELOG entry under 0.4.42. okx_test.go fixtures rebuilt
against the V6 wire shape.

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

15 of 48 new or added lines in 1 file covered. (31.25%)

1 existing line in 1 file now uncovered.

4027 of 18238 relevant lines covered (22.08%)

103.54 hits per line

Uncovered Changes

Lines Coverage ∆ File
33
23.94
-0.84% wltswap/okx.go

Coverage Regressions

Lines Coverage ∆ File
1
23.94
-0.84% wltswap/okx.go
Jobs
ID Job ID Ran Files Coverage
1 26338357447.1 23 May 2026 04:56PM UTC 123
22.08
GitHub Action Run
Source Files on build 26338357447
  • Tree
  • List 123
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26338357447
  • a639e6c5 on github
  • Prev Build on master (#26324848910)
  • Next Build on master (#26338579567)
  • 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