Skip to content

fix(cardano): correct getWalletsByTag URL path and encode tag#128

Merged
jinglescode merged 1 commit into
mainfrom
fix/get-wallets-by-tag-url
Apr 26, 2026
Merged

fix(cardano): correct getWalletsByTag URL path and encode tag#128
jinglescode merged 1 commit into
mainfrom
fix/get-wallets-by-tag-url

Conversation

@jinglescode
Copy link
Copy Markdown
Contributor

Summary

  • getWalletsByTag was calling api/project-wallet/{projectId}/cardano/tag/{tag}, which does not exist on the server. The actual route is api/project-wallet/{projectId}/tag/{tagstring} (see apps/app/src/pages/api/project-wallet/[projectId]/tag/[tagstring].ts). Every call returned a 404 HTML page even when matching wallets existed.
  • URL-encode the tag so emails and any tag with @, /, spaces, or other special characters round-trip safely through the path segment.
  • Bumped to 0.2.3.

Repro (before patch)

const sdk = new Web3Sdk({ projectId, apiKey, privateKey, network: "mainnet" });
await sdk.wallet.cardano.getWalletsByTag("alice@example.com");
// AxiosError: Request failed with status code 404
// url: api/project-wallet/.../cardano/tag/alice@example.com

After patch

Verified end-to-end against https://utxos.dev with 5 random wallet tags from a real 379-wallet project — every call returned the expected MultiChainWalletInfo[] with matching id and tags.

[1/5] mitsuo.watase@equilibrio-inc.com
  csv  id=1ed8e98b-c909-4126-bf6d-78dbff51420a
  api  id=1ed8e98b-c909-4126-bf6d-78dbff51420a ✓
  tags=["mitsuo.watase@equilibrio-inc.com"] ✓
...
[utxos] sample done. pass=5 fail=0 total=5

Test plan

  • Manual: sdk.wallet.cardano.getWalletsByTag(email) returns matching wallets on mainnet
  • Manual: tags containing @ work (email tags)
  • Add a unit/integration test that asserts the URL path the SDK hits

🤖 Generated with Claude Code

The endpoint was hitting `api/project-wallet/{projectId}/cardano/tag/{tag}`,
which does not exist on the server — the route is
`api/project-wallet/{projectId}/tag/{tagstring}`. Every call returned 404
HTML even when matching wallets existed.

Also URL-encode the tag so emails and any tag with special characters
(`@`, `/`, spaces, etc.) round-trip safely through the path segment.

Bumped version to 0.2.3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jinglescode jinglescode merged commit 9b1a1d7 into main Apr 26, 2026
1 check passed
@jinglescode jinglescode deleted the fix/get-wallets-by-tag-url branch April 26, 2026 14:50
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