Skip to content

fix(trade): clear margin requirement copy in the order receipt - #2422

Merged
dcccrypto merged 1 commit into
playgroundfrom
fix/margin-req-copy
Jul 15, 2026
Merged

fix(trade): clear margin requirement copy in the order receipt#2422
dcccrypto merged 1 commit into
playgroundfrom
fix/margin-req-copy

Conversation

@dcccrypto

Copy link
Copy Markdown
Owner

Item 2 of the terminal UX fixes. The receipt row labeled Margin req. actually showed capital → capital − margin — a balance readout — so the real requirement never appeared and the label misdescribed the number. Now:

  • Margin — the collateral this order actually reserves (matches the confirm modal's "Margin Required")
  • Available to trade — before → after, computed on the same available basis (capital − locked margin) as the account strip, so the strip and receipt can never disagree

tsc clean; no logic beyond the two display rows changed.

🤖 Generated with Claude Code

The row labeled "Margin req." actually displayed account capital ->
capital-minus-margin (a balance readout), so the actual requirement never
appeared as a number and the label misdescribed the row. Split it:
"Margin" now shows what this order reserves, and "Available to trade"
shows before -> after on the same available basis as the account strip
(capital minus already-locked margin) so the two readouts always agree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
percolator-launch Ready Ready Preview, Comment Jul 15, 2026 10:35am
percolator-mainnet Ready Ready Preview, Comment Jul 15, 2026 10:35am
percolator-playground Error Error Jul 15, 2026 10:35am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a3bf4df8-5b35-4269-9c61-9a0f10576f12

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/margin-req-copy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dcccrypto
dcccrypto merged commit 4be8989 into playground Jul 15, 2026
13 of 14 checks passed
@dcccrypto
dcccrypto deleted the fix/margin-req-copy branch July 15, 2026 11:13
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