Skip to content

feat: add request body hash helper and creator price snapshot tests - #523

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
dubemoyibe-star:feat/idempotency-hash-and-price-snapshot-tests
Jun 27, 2026
Merged

feat: add request body hash helper and creator price snapshot tests#523
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
dubemoyibe-star:feat/idempotency-hash-and-price-snapshot-tests

Conversation

@dubemoyibe-star

Copy link
Copy Markdown
Contributor

Request Body Idempotency Helper and Creator Price Snapshot Tests

Closes #517
Closes #504

Summary

This PR introduces a reusable request body hashing helper for generating stable idempotency keys and adds integration coverage for creator price snapshots.

Changes

Idempotency Helper

  • Added hashRequestBody(body) helper using SHA-256.
  • Returns a fixed-length hexadecimal hash.
  • Produces consistent hashes for identical inputs.
  • Added unit tests for:
    • identical objects
    • different objects
    • empty objects

Creator Price Snapshot Tests

  • Added integration tests for creator detail responses.
  • Verified current_price is sourced from snapshot data.
  • Confirmed updated snapshots are reflected in API responses.
  • Verified the field exists in both creator detail and creator list endpoints.

Validation

  • Identical input produces the same hash.
  • Different inputs generate different hashes.
  • Empty objects return a valid hash.
  • current_price matches the stored snapshot value.
  • Updated snapshots are returned by subsequent requests.

Testing

  • Added unit tests for request hashing.
  • Added integration tests for creator price snapshots.
  • All tests pass successfully.

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@dubemoyibe-star 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 ebb11bd into accesslayerorg:main Jun 27, 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

2 participants