Skip to content

feat(middleware): normalize asset code parameters to uppercase#233

Merged
Sulex45 merged 1 commit into
stellarkit-lab-devtools:mainfrom
Aycode01:feat/asset-code-normalizer
Jun 2, 2026
Merged

feat(middleware): normalize asset code parameters to uppercase#233
Sulex45 merged 1 commit into
stellarkit-lab-devtools:mainfrom
Aycode01:feat/asset-code-normalizer

Conversation

@Aycode01
Copy link
Copy Markdown
Contributor

@Aycode01 Aycode01 commented Jun 2, 2026

closes #217

Summary

This PR introduces an asset code normalization middleware that automatically converts asset code parameters to uppercase across asset-related routes. This eliminates case-sensitivity issues and ensures consistent asset code handling without requiring developers to manually normalize input.

Type of Change
Bug fix
New feature
Breaking change
Refactor
Documentation
Changes Made
Added normalizeAssetCode middleware at src/middleware/normalizeAssetCode.js
Automatically uppercases req.params.code when present
Automatically uppercases req.query.code when present
Applied middleware to all asset-related routes
Preserved existing behavior for already-uppercase asset codes
Added test coverage for route params, query params, and edge cases
Testing Done
Verified lowercase asset codes are normalized to uppercase
Verified mixed-case asset codes are normalized correctly
Verified already-uppercase asset codes remain unchanged
Tested query parameter normalization
Tested missing code parameters do not cause errors
Verified unrelated request parameters remain untouched
Ran project test suite successfully
Screenshots

N/A (backend middleware change)

Checklist
Code follows the project's style guidelines
Self-review completed
Tests added/updated for changes
Documentation updated if needed
No secrets or credentials in the code
Smart contract changes reviewed for security implications (N/A)

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 2, 2026

@Aycode01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Sulex45 Sulex45 merged commit 3d0f1e2 into stellarkit-lab-devtools:main Jun 2, 2026
1 of 3 checks 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.

Asset Code Case Normalizer Middleware

2 participants