Skip to content

Fix: ensure scaled decimal values are integer strings to avoid unmars… - #424

Open
ayaanoncrypto wants to merge 1 commit into
InjectiveLabs:masterfrom
ayaanoncrypto:contrib/issue-394
Open

Fix: ensure scaled decimal values are integer strings to avoid unmars…#424
ayaanoncrypto wants to merge 1 commit into
InjectiveLabs:masterfrom
ayaanoncrypto:contrib/issue-394

Conversation

@ayaanoncrypto

@ayaanoncrypto ayaanoncrypto commented Aug 27, 2026

Copy link
Copy Markdown

…haling errors

Summary by CodeRabbit

  • Bug Fixes
    • Standardized decimal value formatting across order submission and market configuration workflows.
    • Improved consistency for quantities, prices, margins, fees, tick sizes, settlement values, and oracle prices when sent to the network.
    • Prevented inconsistent fixed-point formatting that could cause discrepancies in transaction parameters.

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 83c52ba5-5e78-4248-9823-83b205f2a203

📥 Commits

Reviewing files that changed from the base of the PR and between ebbb328 and fb97e88.

📒 Files selected for processing (1)
  • pyinjective/composer_v2.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Decimal serialization updates

Layer / File(s) Summary
Order value serialization
pyinjective/composer_v2.py
Spot and derivative order quantities, prices, margins, and trigger prices now use truncated integer strings.
Market parameter serialization
pyinjective/composer_v2.py
Market launch and update parameters now use truncated integer strings for fees, margin ratios, tick sizes, and minimum notionals.
Auxiliary value serialization
pyinjective/composer_v2.py
Settlement prices, margin amounts, open notional caps, and relayed oracle prices now use integer-string conversion.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to fb97e

This localized change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: converting scaled decimal values to integer strings to prevent unmarshaling errors.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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