Skip to content

fix: update coinbase test to match refactored production code - #2

Merged
divinedev111 merged 1 commit into
mainfrom
fix/coinbase-test-types
May 9, 2026
Merged

fix: update coinbase test to match refactored production code#2
divinedev111 merged 1 commit into
mainfrom
fix/coinbase-test-types

Conversation

@divinedev111

Copy link
Copy Markdown
Owner

Summary

Fixes broken tests in backend/internal/connectors/coinbase/coinbase_test.go. The production code was refactored to use ed25519 JWT auth and anonymous struct types in API responses, but the test file wasn't updated.

Changes

  • Replaced references to removed named types (Account, Currency, Balance, PriceData) with anonymous map[string]interface{} that match the current response structure
  • Updated Client initialization: apiKey/apiSecretapiKeyID/privateKey (ed25519)
  • Added crypto/ed25519 and crypto/rand imports to generate a real test key for JWT signing

Related

Fixes #1

- Replace named types (Account, Currency, Balance, PriceData)
  with anonymous map structures matching production code
- Fix Client initialization to use apiKeyID/privateKey fields
  instead of removed apiKey/apiSecret fields
- Generate a real ed25519 key for JWT auth in tests

Fixes #1
@divinedev111 divinedev111 added the bug Something isn't working label May 9, 2026
@divinedev111
divinedev111 merged commit d4ccd5c into main May 9, 2026
2 checks passed
@divinedev111
divinedev111 deleted the fix/coinbase-test-types branch May 9, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken tests in internal/connectors/coinbase/coinbase_test.go

2 participants