Skip to content

fix: validate limit param, clear strategy preview on market change, g… - #570

Open
Good-Coded wants to merge 1 commit into
Zenith-options:mainfrom
Good-Coded:fix/issues-527-528-529-530
Open

Good-Coded wants to merge 1 commit into
Zenith-options:mainfrom
Good-Coded:fix/issues-527-528-529-530

Conversation

@Good-Coded

Copy link
Copy Markdown

…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

  • Tests pass locally
  • No new warnings/lints introduced

…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.
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