-
Notifications
You must be signed in to change notification settings - Fork 16
fix(core): fix the safe transaction detection issue when the call dat… #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…a size large than 1024
WalkthroughA global buffer for leftover transaction data is introduced in Ethereum signing code. Data chunk handling is updated to use this buffer when available. Signature parsing and validation are improved. UI code now handles scroll events to resume the LCD and cleans up imports. Changes
Estimated code review effort3 (~40 minutes) ✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
core/src/apps/ethereum/onekey/sign_tx.py (1)
370-370: Fix Yoda condition.- and 437 <= msg.data_length + and msg.data_length >= 437
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (3)
core/src/apps/ethereum/onekey/sign_tx.py(7 hunks)core/src/apps/ethereum/onekey/sign_tx_eip1559.py(3 hunks)core/src/trezor/lvglui/scrs/reset_device.py(4 hunks)
🪛 Ruff (0.12.2)
core/src/apps/ethereum/onekey/sign_tx.py
370-370: Yoda condition detected
Rewrite as msg.data_length >= 437
(SIM300)
🧰 Additional context used
🪛 Ruff (0.12.2)
core/src/apps/ethereum/onekey/sign_tx.py
370-370: Yoda condition detected
Rewrite as msg.data_length >= 437
(SIM300)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Style check
- GitHub Check: Gen check
- GitHub Check: Defs check
🔇 Additional comments (4)
core/src/trezor/lvglui/scrs/reset_device.py (1)
3-3: LGTM!Import moved to top-level. Event handling improved.
Also applies to: 87-87, 103-103, 107-107, 145-146, 488-488
core/src/apps/ethereum/onekey/sign_tx_eip1559.py (2)
33-33: LGTM!Good optimization for handling leftover transaction data chunks.
Also applies to: 39-39, 268-276
333-333: LGTM!Proper cleanup of leftover data state.
core/src/apps/ethereum/onekey/sign_tx.py (1)
44-44: No thread safety issue detected.Likely an incorrect or invalid review comment.
…a size large than 1024
Summary by CodeRabbit
New Features
Bug Fixes
Chores