-
Notifications
You must be signed in to change notification settings - Fork 16
chore: optimize ton version limit #464
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
WalkthroughThe changes add a Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TonClass (GetAddress/SignMessage/SignProof)
participant Device
User->>TonClass: Initialize
TonClass->>TonClass: Set strictCheckDeviceSupport = true
TonClass->>Device: Check device model and version (model_touch >= 4.10.0)
Device-->>TonClass: Respond with support status
TonClass-->>User: Proceed or error based on support
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 🪧 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 (
|
a96c0a5
to
8c040bd
Compare
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
🔭 Outside diff range comments (1)
packages/connect-examples/expo-example/src/data/bitcoin.ts (1)
290-342
: 🧹 Nitpick (assertive)Large transaction test case is valuable but consider performance
This new example with 80,000 outputs helps test edge cases with large transactions, which is good practice. However, creating such a massive array in memory might slow down the demo app.
Consider these improvements:
- Reduce the number of outputs to 1,000-5,000 for better demo performance
- Translate the Chinese comment "P2PKH 脚本" to English for consistency
- Add a brief comment explaining why testing with large transactions matters
- ...Array.from({ length: 80_000 }, (_, i) => ({ + ...Array.from({ length: 5_000 }, (_, i) => ({ amount: '100000000', - script_pubkey: `76a914${i.toString(16).padStart(40, '0')}88ac`, // P2PKH 脚本 + script_pubkey: `76a914${i.toString(16).padStart(40, '0')}88ac`, // P2PKH script - testing firmware with large transactions })),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro (Legacy)
📒 Files selected for processing (4)
packages/connect-examples/expo-example/src/data/bitcoin.ts
(1 hunks)packages/core/src/api/ton/TonGetAddress.ts
(2 hunks)packages/core/src/api/ton/TonSignMessage.ts
(2 hunks)packages/core/src/api/ton/TonSignProof.ts
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build (18.x)
- GitHub Check: lint (18.x)
🔇 Additional comments (6)
packages/connect-examples/expo-example/src/data/bitcoin.ts (1)
276-284
: Good addition to the exampleAdding
bin_outputs
andlock_time
makes this Bitcoin transaction example more complete and realistic.packages/core/src/api/ton/TonSignProof.ts (2)
11-11
: Added strict device support check.This adds stronger validation for device compatibility, matching the other TON classes.
46-46
: Updated model key from 'pro' to 'model_touch'.Consistent change across TON files for better device type identification.
packages/core/src/api/ton/TonGetAddress.ts (2)
15-15
: Added strict device support check.This adds stronger validation for device compatibility, matching the other TON classes.
60-60
: Updated model key from 'pro' to 'model_touch'.Consistent change across TON files for better device type identification.
packages/core/src/api/ton/TonSignMessage.ts (1)
23-23
: Added strict device support check.This adds stronger validation for device compatibility, matching the other TON classes.
Summary by CodeRabbit