Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleaning for URL construction #386

Merged
merged 5 commits into from
Dec 4, 2024

Conversation

anktd
Copy link
Collaborator

@anktd anktd commented Nov 27, 2024

Changes

  • Removed /api suffix from BASE_URL and BCH_BASE_URL constants
  • Standardized API endpoint construction by explicitly adding /api prefix where needed
  • Fixed transaction URL construction:
    • BTC: https://www.blockonomics.co/#/search?q={txid}&addr={address}
    • BCH: https://bch.blockonomics.co/api/tx?txid={txid}&addr={address}
  • Updated all store-related API endpoints to use consistent /api/v2/stores pattern

Why

  • Makes base URL constants more intuitive and less prone to bugs
  • Ensures consistent API endpoint construction across the codebase
  • Fixes BCH transaction URL format to match expected pattern
  • Improves code maintainability by removing duplicate code

@shivaenigma shivaenigma merged commit d2c4310 into blockonomics:master Dec 4, 2024
1 check passed
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.

2 participants