Skip to content

feat(okx): pass offline signer to Cosmos toolbox (V3 flow)#13

Merged
towanTG merged 1 commit intodevelopfrom
feat/okx-cosmos-v3
Apr 16, 2026
Merged

feat(okx): pass offline signer to Cosmos toolbox (V3 flow)#13
towanTG merged 1 commit intodevelopfrom
feat/okx-cosmos-v3

Conversation

@towanTG
Copy link
Copy Markdown
Contributor

@towanTG towanTG commented Apr 15, 2026

Summary

One-line fix: the OKX Cosmos path already builds a Keplr-compatible `OfflineAminoSigner` via `wallet.getOfflineSignerOnlyAmino(chainId)`, but never hands it to `getCosmosToolbox`. Passing it in lets the toolbox synthesize `signAndBroadcastTransaction`, which the V3 SwapKit plugin calls.

Why

The V3 plugin invokes `wallet.signAndBroadcastTransaction(cosmosTx)`. That method is only exposed when the toolbox is constructed with a signer. Without it, OKX Cosmos silently falls back to the bespoke `transfer` helper and V3 swaps fail.

Test plan

  • Connect OKX wallet on Cosmos, verify address + balance fetch still work
  • Run a V3 Cosmos swap end-to-end; confirm `signAndBroadcastTransaction` resolves with a txid
  • Regression: legacy `wallet.transfer({...})` for Cosmos still works (`cosmosTransfer` helper remains on the returned wallet)

🤖 Generated with Claude Code

OKX already builds a Keplr-compatible OfflineAminoSigner via
wallet.getOfflineSignerOnlyAmino(chainId); it just wasn't being passed
into getCosmosToolbox. Wiring it in lets the toolbox synthesize
signAndBroadcastTransaction, which the V3 SwapKit plugin calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@towanTG towanTG merged commit 6844fd6 into develop Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant