-
Notifications
You must be signed in to change notification settings - Fork 24
fix: example #610
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
fix: example #610
Conversation
WalkthroughRemoved the shared-constants workspace and its getConnectSrc export; added Changes
Sequence DiagramsequenceDiagram
rect rgb(230,240,255)
participant App as App / Bundler
participant Webpack as Webpack
participant Shim as shim-axios.js
participant Axios as axios
end
App->>Webpack: import axios
Webpack->>Webpack: resolve alias -> shim-axios.js
Webpack->>Shim: load shim
Shim->>Axios: require('axios')
Axios-->>Shim: axios object
Shim->>Shim: ensure `.default` and `interceptors`
Shim-->>Webpack: export augmented axios
Webpack-->>App: provide shimmed axios module
sequenceDiagram
opt Previous (batched)
participant Core as Core XrpGetAddress (old)
participant Device as Device
Core->>Device: BatchGetPublickeys (bundle)
Device-->>Core: multiple public keys
Core->>Core: derive addresses via deriveAddress
end
opt New (per-item)
participant CoreN as Core XrpGetAddress (new)
participant DeviceN as Device
CoreN->>DeviceN: RippleGetAddress for each item
CoreN->>DeviceN: BatchGetPublickeys for each secp256k1 item
DeviceN-->>CoreN: public key per item
CoreN->>CoreN: compute address using sha256→ripemd160→encodeAccountID
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. |
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: 3
📜 Review details
Configuration used: CodeRabbit 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 ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (7)
package.json(1 hunks)packages/connect-examples/expo-example/package.json(1 hunks)packages/connect-examples/expo-example/shim-axios.js(1 hunks)packages/connect-examples/expo-example/src/constants/connect.ts(1 hunks)packages/connect-examples/expo-example/webpack.config.js(1 hunks)packages/connect-examples/shared-constants/constants.js(0 hunks)packages/connect-examples/shared-constants/package.json(0 hunks)
💤 Files with no reviewable changes (2)
- packages/connect-examples/shared-constants/constants.js
- packages/connect-examples/shared-constants/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: deploy_preview
- GitHub Check: lint (22)
- GitHub Check: build (22)
🔇 Additional comments (4)
packages/connect-examples/expo-example/src/constants/connect.ts (1)
3-3: Environment-based config is cleaner than the old shared function.The fallback URL version (1.1.17) matches the package version. Logic is clear.
packages/connect-examples/expo-example/webpack.config.js (1)
58-63: Axios alias configuration looks correct.Using
require.resolveensures the shim path is resolved correctly. Spreading existing aliases prevents conflicts.packages/connect-examples/expo-example/shim-axios.js (1)
9-12: The .default property fix handles Rollup interop correctly.This ensures
axios__default["default"]resolves properly when Rollup compiles the code.packages/connect-examples/expo-example/package.json (1)
42-42: Axios 1.12.2 is valid and has no known vulnerabilities.Version 1.12.2 exists on npm (released Sep 14, 2025) and is only one minor version behind the latest (1.13.2). None of the known HIGH or MODERATE severity advisories affect this version—all reported vulnerabilities were patched in earlier updates that 1.12.2 includes.
|
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.
|
095d4b8 to
402d486
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
📜 Review details
Configuration used: CodeRabbit 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 ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (5)
packages/connect-examples/expo-example/package.json(2 hunks)packages/connect-examples/expo-example/src/utils/mockDevice/method/xrpGetAddress.ts(1 hunks)packages/connect-examples/expo-playground/package.json(0 hunks)packages/core/package.json(1 hunks)packages/core/src/api/xrp/XrpGetAddress.ts(0 hunks)
💤 Files with no reviewable changes (2)
- packages/core/src/api/xrp/XrpGetAddress.ts
- packages/connect-examples/expo-playground/package.json
🧰 Additional context used
🧬 Code graph analysis (1)
packages/connect-examples/expo-example/src/utils/mockDevice/method/xrpGetAddress.ts (1)
packages/core/src/api/helpers/hexUtils.ts (2)
bytesToHex(57-65)hexToBytes(70-84)
⏰ 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). (2)
- GitHub Check: lint (22)
- GitHub Check: build (22)
🔇 Additional comments (2)
packages/core/package.json (1)
37-46: Peer + dev dependency choice looks fine, but confirm version alignmentUsing
@noble/hashesin bothpeerDependenciesanddevDependenciesis a reasonable pattern for a library that expects consumers to bring their own runtime copy but still needs it for builds/tests. The bump to@types/web-bluetoothalso looks safe on its own, but please confirm everything still compiles and runs cleanly across all packages that depend on these types and hashes.packages/connect-examples/expo-example/package.json (1)
41-87: New axios and ripple-address-codec deps look consistent with usageAdding
axios@1.12.2here lines up with the same version used in@onekeyfe/hd-core, which should help avoid duplicate installs. Introducingripple-address-codec@^5.0.0also matches the new XRP address derivation logic inxrpGetAddress.ts.Please just confirm that:
- The axios shim/alias wiring for Expo and Webpack still resolves to the shim as intended.
- There are no version conflicts with other packages in the monorepo that also use these libs.
packages/connect-examples/expo-example/src/utils/mockDevice/method/xrpGetAddress.ts
Show resolved
Hide resolved
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
📜 Review details
Configuration used: CodeRabbit 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 (3)
packages/connect-examples/expo-example/package.json(2 hunks)packages/connect-examples/expo-playground/package.json(0 hunks)packages/core/package.json(1 hunks)
💤 Files with no reviewable changes (1)
- packages/connect-examples/expo-playground/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: lint (22)
- GitHub Check: build (22)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
packages/core/package.json (1)
27-36: Verify axios integration with shim and webpack alias.axios is now a core dependency. Per the PR context, a webpack alias and shim (shim-axios.js) are configured in expo-example. Ensure the shim properly handles the interop and that axios works as expected in bundled environments (Rollup, webpack).
packages/connect-examples/expo-example/package.json (1)
42-42: Verify ripple-keypairs migration and axios shim integration.You've swapped ripple-keypairs and xrpl for ripple-address-codec and added axios. Ensure:
Migration complete: All code formerly using ripple-keypairs/xrpl now uses ripple-address-codec or the new custom derivation logic (mentioned in PR context). Check that both packages are removed from devDependencies too, not just dependencies.
axios shim working: The webpack alias and shim-axios.js need to properly handle axios for both browser and Node bundling. Verify bundled output includes axios correctly.
Also applies to: 86-86
|
@coderabbitai resolve |
✅ Actions performedComments resolved. |
Summary by CodeRabbit
New Features
Refactor
Chores
✏️ Tip: You can customize this high-level summary in your review settings.