-
Notifications
You must be signed in to change notification settings - Fork 25
Feat/stellar #636
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
Feat/stellar #636
Conversation
WalkthroughThis PR bumps all package versions from 1.1.21 to 1.1.22-alpha.1 across the monorepo and adds Stellar network support to core APIs with type-only import refactoring. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting Disabled knowledge base sources:
📒 Files selected for processing (21)
⏰ 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)
🔇 Additional comments (22)
Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
packages/core/src/api/allnetwork/AllNetworkGetAddress.ts (2)
74-78: Progress calculation may be misleading.You're iterating over
methodGroups(grouped by method name), but dividing bythis.payload.bundle.length(total items). If 10 addresses use 2 methods, you'd jump from 50% to 100% in two steps—not smooth progress. Consider tracking actual items processed instead.🔎 Suggested fix
Track cumulative items processed:
let i = 0; + let processedItems = 0; for (const [methodName, params] of Object.entries(methodGroups)) { // ... existing code ... for (let i = 0; i < params.length; i++) { // ... existing mapping code ... + processedItems++; } if (this.payload?.bundle?.length > 1) { - const progress = Math.round(((i + 1) / this.payload.bundle.length) * 100); + const progress = Math.round((processedItems / this.payload.bundle.length) * 100); this.postMessage(createUiMessage(UI_REQUEST.DEVICE_PROGRESS, { progress })); } - i++; }
43-43: Unused loop variablei.Line 43 declares
let i = 0and line 78 increments it, but you never useiafter that. Thefor...ofon line 44 doesn't need it. Clean it up or use it in progress calculation.packages/core/src/api/allnetwork/AllNetworkGetAddressByLoop.ts (1)
48-49: Consider typing thebundleparameter.
bundle: any[]is pretty loose. You already haveAllNetworkAddressParams[]available. Stronger types catch bugs earlier.🔎 Suggested fix
+import type { + AllNetworkAddress, + AllNetworkAddressParams, + AllNetworkGetAddressParamsByLoop, +} from '../../types/api/allNetworkGetAddress'; private async processCallbacksInBackground( - bundle: any[], + bundle: AllNetworkAddressParams[], rootFingerprint: number,
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (21)
packages/connect-examples/electron-example/package.jsonpackages/connect-examples/expo-example/package.jsonpackages/connect-examples/expo-playground/package.jsonpackages/core/package.jsonpackages/core/src/api/allnetwork/AllNetworkGetAddress.tspackages/core/src/api/allnetwork/AllNetworkGetAddressBase.tspackages/core/src/api/allnetwork/AllNetworkGetAddressByLoop.tspackages/core/src/api/stellar/StellarGetAddress.tspackages/core/src/api/stellar/StellarSignTransaction.tspackages/core/src/types/api/allNetworkGetAddress.tspackages/hd-ble-sdk/package.jsonpackages/hd-common-connect-sdk/package.jsonpackages/hd-transport-electron/package.jsonpackages/hd-transport-emulator/package.jsonpackages/hd-transport-http/package.jsonpackages/hd-transport-lowlevel/package.jsonpackages/hd-transport-react-native/package.jsonpackages/hd-transport-web-device/package.jsonpackages/hd-transport/package.jsonpackages/hd-web-sdk/package.jsonpackages/shared/package.json
⏰ 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: Publish v1.1.22-alpha.1
- GitHub Check: build (22)
- GitHub Check: lint (22)
🔇 Additional comments (22)
packages/hd-transport-emulator/package.json (1)
3-3: LGTM! Version bumps are consistent.The package version and dependency versions are all correctly bumped to 1.1.22-alpha.1. Exact pinning ensures version consistency across the monorepo.
Also applies to: 27-28
packages/core/src/api/stellar/StellarGetAddress.ts (1)
6-7: LGTM! Type-only imports are correctly applied.The refactoring to type-only imports is safe. These types appear only in type positions (generics, type annotations) with no runtime usage.
packages/core/src/api/stellar/StellarSignTransaction.ts (2)
1-1: Correct:StellarMemoTypekept as runtime import.This enum is accessed at runtime (line 181:
StellarMemoType.NONE), so it must remain a value import.
9-13: LGTM! Type-only imports correctly applied.These types appear only in type positions. The refactoring won't affect runtime behavior.
packages/hd-transport/package.json (1)
3-3: Version bump to alpha release looks good.Consistent with the PR's coordinated version updates across the monorepo.
packages/core/src/api/allnetwork/AllNetworkGetAddressBase.ts (1)
243-245: Stellar network support added successfully.The minimal configuration (method name only) is consistent with other simple networks like
sol,algo, andnear. If Stellar addresses don't require parameter transformation, this is correct.packages/hd-transport-http/package.json (1)
3-3: Version bump synchronized across dependencies.All internal package references updated to 1.1.22-alpha.1 consistently.
packages/hd-transport-electron/package.json (1)
3-3: Version and dependencies updated consistently.All internal package dependencies bumped to 1.1.22-alpha.1 in sync with the package version.
Also applies to: 28-30
packages/hd-common-connect-sdk/package.json (1)
3-3: Coordinated version bump across all internal dependencies.Package and all @onekeyfe dependencies updated to 1.1.22-alpha.1 consistently.
Also applies to: 23-28
packages/core/package.json (1)
3-3: Core package version and dependencies synchronized.Version bump to 1.1.22-alpha.1 with matching internal dependency updates.
Also applies to: 28-29
packages/hd-web-sdk/package.json (1)
3-3: Version bump looks consistent.Package version and internal dependencies all align at
1.1.22-alpha.1. Good coordination.Also applies to: 24-27
packages/shared/package.json (1)
3-3: LGTM!Version bump to
1.1.22-alpha.1is in sync with the rest of the monorepo.packages/core/src/api/allnetwork/AllNetworkGetAddress.ts (1)
3-7: Imports look good.Type-only import for
CoreApiis the right call. UI messaging imports are needed for progress reporting.packages/connect-examples/electron-example/package.json (1)
5-5: LGTM!Version and dependency bump are consistent.
Also applies to: 25-25
packages/core/src/api/allnetwork/AllNetworkGetAddressByLoop.ts (1)
1-16: Imports cleaned up nicely.Good separation of runtime vs type imports.
AllNetworkGetAddressBaseintegration unifies the address-fetching logic.packages/hd-transport-react-native/package.json (1)
3-3: LGTM!Version and dependencies align at
1.1.22-alpha.1.Also applies to: 22-23
packages/hd-transport-lowlevel/package.json (1)
3-3: LGTM!Version and dependencies are consistent at
1.1.22-alpha.1.Also applies to: 22-23
packages/core/src/types/api/allNetworkGetAddress.ts (1)
36-37: Good catch on both additions. Bothneoandstellarare now in theINetworkunion and have matching implementations inAllNetworkGetAddressBase(neoGetAddressandstellarGetAddress). PR title mentions only Stellar, but neo slips in here too. All good.packages/connect-examples/expo-playground/package.json (1)
3-3: Version bump looks good.The alpha version and dependency updates are consistent across the monorepo.
Also applies to: 20-22
packages/connect-examples/expo-example/package.json (1)
3-3: LGTM!Version and dependency updates are properly coordinated.
Also applies to: 22-25
packages/hd-ble-sdk/package.json (1)
3-3: Version synchronization looks correct.All internal dependencies updated consistently to the alpha release.
Also applies to: 23-25
packages/hd-transport-web-device/package.json (1)
3-3: Coordinated version bump is correct.Dependencies and devDependencies properly updated to match the alpha release.
Also applies to: 23-24, 27-27
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.