Repository navigation
fix: CSP header, auth retry, idempotency keys, decimal-safe helpers - #333
Merged
Merged
Conversation
- Add Content-Security-Policy header in next.config.ts with 'unsafe-inline' for scripts (needed for theme init, Turbopack dev, React hydration) - Fix AuthContext.refresh() to retry up to 3 times with exponential backoff on network/timeout errors instead of silently logging the user out - Only clear the JWT token on genuine 401/403 auth failures Closes MergeFi#4
…pers - Generate UUID idempotency keys for fund, claim, refund, and deposit API calls to prevent double-submission on retries - Add toCents/toMajorUnits helpers for integer-based financial arithmetic to eliminate floating-point drift in aggregated displays - Preserves precision for USDC (2 decimals) and XLM (7 decimals) Closes MergeFi#6 MergeFi#17
…lpers - AuthContext: test that 401 clears token, network errors retry 3x with backoff, retries exhausted keeps session - utils: test generateIdempotencyKey uniqueness and UUID format - utils: test toCents/toMajorUnits conversion and float-drift-free sum Refs MergeFi#4 MergeFi#6 MergeFi#17
|
@luciachizaram 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! 🚀 |
|
@luciachizaram is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes 4 issues across security, auth resilience, and financial precision
(needed for theme init, Turbopack dev, React hydration)
network errors instead of silently logging the user out; only clear
JWT on genuine 401/403
API calls to prevent double-submission on retries
arithmetic to eliminate floating-point drift
Closes #4
Closes #6
Closes #17
Closes #22