Skip to content

Fix amount truncation precision, SEP-7 domain typo, remove swap files - #992

Merged
IbrahimIjai merged 2 commits into
mainfrom
fix/audit-findings
Oct 17, 2026
Merged

IbrahimIjai merged 2 commits into
mainfrom
fix/audit-findings

Conversation

@IbrahimIjai

Copy link
Copy Markdown
Contributor

Changes

  • parseAmount precision: truncation used Math.floor(x * 10^d) / 10^d, which drops a unit on binary-rounding inputs ("0.57" → 0.5699999). Now truncates the decimal string. Regression test added.
  • SEP-7 fallback origin: ConnectButton.tsx SSR fallback was https://so4.markets (typo of so4.market); wallet callbacks could have pointed at a foreign domain.
  • Swap files: removed 10 committed nano .swp lock files from the repo root; added *.swp to .gitignore.

Commit gate

  • ✅ bun run test, bun run test:coverage, bun run build
  • ✅ eslint on all changed files
  • ⚠️ bun lint, bun typecheck, bun run check:tokens fail identically on main before this change (import/order + no-unnecessary-condition in trade components, TS2304: Cannot find name 'ENV' in ConfirmationDialog.tsx, unused midPrice in DepthLadder.tsx, existing token violations). None are in files touched here.

…wap files

- parseAmount truncated via Math.floor(x * 10^d) / 10^d, which drops a
  unit on binary-rounding inputs ("0.57" became 0.5699999). Truncate the
  decimal string instead; add regression test.
- ConnectButton SSR fallback origin pointed at so4.markets (typo of
  so4.market), which would route wallet callbacks to a foreign domain.
- Add *.swp to .gitignore after removing committed nano swap files.
@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
interface-web Error Error Oct 17, 2026 10:20am UTC

@IbrahimIjai
IbrahimIjai merged commit 63799d3 into main Oct 17, 2026
3 of 5 checks passed
@IbrahimIjai
IbrahimIjai deleted the fix/audit-findings branch October 17, 2026 10:20

This branch had an error being deployed

1 failed deployment
Preview — bef67a23 Deployed Oct 17, 2026 by vercel[bot]
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.

1 participant