Repository navigation
fix: validate limit param, clear strategy preview on market change, g… - #570
Open
Good-Coded wants to merge 1 commit into
Open
Good-Coded wants to merge 1 commit into
Good-Coded wants to merge 1 commit into
Conversation
…uard vault.strategies, catch inline scripts without SRI Closes Zenith-options#527, Zenith-options#528, Zenith-options#529, Zenith-options#530 - Zenith-options#527: parseLimit returns null for missing/invalid/out-of-range values; GET /api/public/vaults now returns 400 { error, message } instead of silently clamping a negative limit through to the backend. - Zenith-options#528: useStrategyPreview resets selectedStrategy, showStrategyConfirm, and tradeError in a useEffect keyed on sym, so switching markets clears the stale preview before the new fetch resolves. - Zenith-options#529: vault.strategies is optional per the API schema; added the field to the VaultDetail OpenAPI definition (marked optional) and wrapped the render path in page.tsx with optional-chaining so a missing field renders an empty state instead of throwing. - Zenith-options#530: check-external-scripts.mjs now also inspects inline <script> tags (those without a src attribute) and fails with a clear file+tag message when any such tag is missing an integrity= attribute.
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.
…uard vault.strategies, catch inline scripts without SRI
Closes #527: parseLimit returns null for missing/invalid/out-of-range values; GET /api/public/vaults now returns 400 { error, message } instead of silently clamping a negative limit through to the backend.
Closes #528: useStrategyPreview resets selectedStrategy, showStrategyConfirm, and tradeError in a useEffect keyed on sym, so switching markets clears the stale preview before the new fetch resolves.
Closes #529: vault.strategies is optional per the API schema; added the field to the VaultDetail OpenAPI definition (marked optional) and wrapped the render path in page.tsx with optional-chaining so a missing field renders an empty state instead of throwing.
Closes #530: check-external-scripts.mjs now also inspects inline <script> tags (those without a src attribute) and fails with a clear file+tag message when any such tag is missing an integrity= attribute.
Summary
Changes
Testing
Checklist