Skip to content

test: validate default wallet holdings ordering by total value#532

Merged
Chucks1093 merged 3 commits into
accesslayerorg:mainfrom
techAlhaji:test/wallet-holdings-default-sort
Jun 28, 2026
Merged

test: validate default wallet holdings ordering by total value#532
Chucks1093 merged 3 commits into
accesslayerorg:mainfrom
techAlhaji:test/wallet-holdings-default-sort

Conversation

@techAlhaji

Copy link
Copy Markdown
Contributor

Closes #516

Summary

Adds an integration test to verify that the wallet holdings endpoint returns holdings sorted by total holding value (balance × price) in descending order when no explicit sort parameter is provided.

Changes

  • Added an integration test for GET /wallets/:address/holdings
  • Seeded a wallet with three creator holdings having different total values
  • Called the endpoint without a sort parameter
  • Verified the response is ordered by total holding value in descending order
  • Confirmed the highest-value holding appears first and the lowest-value holding appears last

Acceptance Criteria Covered

  • ✅ Default sort is total holding value descending
  • ✅ Highest-value entry appears first
  • ✅ Lowest-value entry appears last

Testing

Added coverage for:

  • default holdings ordering
  • descending total value sorting
  • deterministic ordering using fixed seed data
  • regression protection for future sorting changes

Verification

Executed:

  • npm test
  • npm run build (if applicable)

Notes

  • Test-first implementation.
  • If the existing implementation does not satisfy the expected behavior, only the minimal production change required to make the endpoint sort by total holding value descending by default should be introduced.
  • No unrelated refactoring.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@techAlhaji 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

@Chucks1093 Chucks1093 merged commit 34935ad into accesslayerorg:main Jun 28, 2026
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.

Add integration test for holdings endpoint returning entries sorted by total value descending

2 participants