-
Notifications
You must be signed in to change notification settings - Fork 22
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: babylon cosmos provider example #287
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request introduces updates across multiple packages, focusing on adding support for the Babylon chain. The changes include version incrementation, new chain registration, dApp configuration, and a comprehensive wallet connection component for Bitcoin and Cosmos networks. New dependencies have been added to support these functionalities, and a new page has been created to showcase the Babylon DApp example. Changes
Sequence DiagramsequenceDiagram
participant User
participant WalletConnect
participant BitcoinProvider
participant CosmosProvider
User->>WalletConnect: Initiate Connection
WalletConnect->>BitcoinProvider: Connect Bitcoin Wallet
WalletConnect->>CosmosProvider: Connect Cosmos Wallet
BitcoinProvider-->>User: Wallet Connected
CosmosProvider-->>User: Wallet Connected
User->>BitcoinProvider: Request Transaction
User->>CosmosProvider: Request Transaction
Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
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: 10
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
packages/example/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (8)
packages/core/src/versionInfo.ts
(1 hunks)packages/example/chains.ts
(1 hunks)packages/example/components/chains/babylon/dapps.config.ts
(1 hunks)packages/example/components/chains/babylon/example.tsx
(1 hunks)packages/example/components/chains/babylon/types.ts
(1 hunks)packages/example/package.json
(2 hunks)packages/example/pages/babylon/index.tsx
(1 hunks)packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts
(2 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
packages/example/components/chains/babylon/example.tsx
[error] 53-53: Avoid the use of spread (...
) syntax on accumulators.
Spread syntax should be avoided on accumulators (like those in .reduce
) because it causes a time complexity of O(n^2)
.
Consider methods such as .splice or .push instead.
(lint/performance/noAccumulatingSpread)
[error] 409-409: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
[error] 411-411: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
[error] 473-473: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
[error] 475-476: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: test_build_web
- GitHub Check: lint (ubuntu-latest, 20)
- GitHub Check: Socket Security: Pull Request Alerts
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (9)
packages/example/chains.ts (1)
70-75
: Clean addition of Babylon chain!The new chain entry follows the established pattern and uses consistent URL structure.
packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts (1)
38-39
: Good version management approach!Syncing version with base provider ensures consistency across the codebase.
Also applies to: 60-60
packages/core/src/versionInfo.ts (1)
2-2
: Version bump looks good!Appropriate increment for the new Babylon chain feature.
packages/example/components/chains/babylon/dapps.config.ts (1)
1-10
: Verify dApp URLs accessibilityLet's ensure the dApp URLs are accessible and use HTTPS.
✅ Verification successful
URLs verified successfully
Both dApp URLs are secure (HTTPS) and accessible.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if the dApp URLs are accessible and secure for url in "https://app.osmosis.zone/" "https://junoswap.com/"; do echo "Checking $url" curl -sI "$url" | head -n 1 doneLength of output: 398
packages/example/package.json (3)
26-26
: Looks good! @cosmjs/stargate additionThe version aligns well with your existing @cosmjs/amino dependency.
28-28
: Check for newer versions of @keystonehq/keystone-sdkLet's verify if version ^0.9.1 is the latest stable release.
✅ Verification successful
Package is using the latest version
The current version ^0.9.1 matches the latest stable release on npm.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check latest version and release info curl -s https://registry.npmjs.org/@keystonehq/keystone-sdk | jq -r '.["dist-tags"].latest'Length of output: 99
69-69
: Verify stability of @tomo-inc/wallet-connect-sdkThe version ^0.3.10 suggests early development stage. Let's check:
- Latest version
- Weekly downloads (adoption)
- Last publish date
packages/example/components/chains/babylon/types.ts (2)
1-1
: Clean import statement!Good job using a specific type import instead of importing the whole module.
1-9
: Verify type usage across the codebaseLet's ensure these types are used consistently in related components.
✅ Verification successful
Types are correctly defined and used consistently
The
IProviderApi
andIProviderInfo
types follow the standard pattern used across all chain implementations. TheBBNProviderCosmos
import is properly utilized in both babylon and cosmosBabylon chains.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for usage of IProviderApi and IProviderInfo echo "Searching for IProviderApi usage:" rg "IProviderApi" -t ts -t tsx echo -e "\nSearching for IProviderInfo usage:" rg "IProviderInfo" -t ts -t tsxLength of output: 280
Script:
#!/bin/bash # Search with correct file patterns echo "Searching for IProviderApi usage:" rg "IProviderApi" --type-add 'ts:*.{ts,tsx}' -t ts echo -e "\nSearching for IProviderInfo usage:" rg "IProviderInfo" --type-add 'ts:*.{ts,tsx}' -t ts # Search for related imports echo -e "\nSearching for BBNProviderCosmos imports:" rg "BBNProviderCosmos" --type-add 'ts:*.{ts,tsx}' -t tsLength of output: 17430
const providers = useTomoProviders(); | ||
console.log('providers', providers); |
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.
🧹 Nitpick (assertive)
Clean up debug console statements
The console.log
statements used for debugging should be removed to tidy up the code.
- console.log('providers', providers);
- console.log('providerBitcoin', providerBitcoin);
- console.log('providerCosmos', providerCosmos);
Also applies to: 80-81
const network = await providerBitcoin?.getNetwork(); | ||
|
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.
🧹 Nitpick (assertive)
Use Number.parseInt
instead of parseInt
For consistency and to align with ES2015 standards, replace the global parseInt
with Number.parseInt
.
- const amount = parseInt(fromData['amount'] as string);
- const gasPrice = parseInt((fromData['gasPrice'] as string) ?? '20');
+ const amount = Number.parseInt(fromData['amount'] as string);
+ const gasPrice = Number.parseInt((fromData['gasPrice'] as string) ?? '20');
Repeat similar changes at other instances.
Also applies to: 411-411, 473-474, 475-476
🧰 Tools
🪛 Biome (1.9.4)
[error] 409-409: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
if (!providerDetail) { | ||
return Promise.reject('Wallet not found'); | ||
} |
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.
🛠️ Refactor suggestion
Reject promises with Error objects
Rejecting promises with a string can lead to unhandled rejections without stack traces. Use an Error
object instead for better error handling.
- return Promise.reject('Wallet not found');
+ return Promise.reject(new Error('Wallet not found'));
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if (!providerDetail) { | |
return Promise.reject('Wallet not found'); | |
} | |
if (!providerDetail) { | |
return Promise.reject(new Error('Wallet not found')); | |
} |
} | ||
|
||
const result = await tomoModal.open(providerDetail.inject as 'bitcoin' | 'cosmos'); | ||
console.log('xxxx', result); |
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.
🧹 Nitpick (assertive)
Remove unnecessary console.log statement
The console.log('xxxx', result);
appears to be a leftover debug statement. Remove it to clean up the code.
- console.log('xxxx', result);
.reduce( | ||
(acc, [k, v]) => ({ | ||
...acc, | ||
[k]: v === Object(v) && !Array.isArray(v) ? removeNull(v) : v, | ||
}), | ||
{}, | ||
); |
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.
🛠️ Refactor suggestion
Avoid using spread operator in reduce for better performance
Using the spread operator ...acc
within a reducer can lead to O(n²) time complexity because it creates a new object on each iteration. Modify the accumulator directly to improve efficiency.
- return Object.entries(obj)
- .filter(([, v]) => v != null)
- .reduce(
- (acc, [k, v]) => ({
- ...acc,
- [k]: v === Object(v) && !Array.isArray(v) ? removeNull(v) : v,
- }),
- {},
- );
+ const acc = {};
+ for (const [k, v] of Object.entries(obj)) {
+ if (v != null) {
+ acc[k] = v === Object(v) && !Array.isArray(v) ? removeNull(v) : v;
+ }
+ }
+ return acc;
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
.reduce( | |
(acc, [k, v]) => ({ | |
...acc, | |
[k]: v === Object(v) && !Array.isArray(v) ? removeNull(v) : v, | |
}), | |
{}, | |
); | |
const acc = {}; | |
for (const [k, v] of Object.entries(obj)) { | |
if (v != null) { | |
acc[k] = v === Object(v) && !Array.isArray(v) ? removeNull(v) : v; | |
} | |
} | |
return acc; |
🧰 Tools
🪛 Biome (1.9.4)
[error] 53-53: Avoid the use of spread (...
) syntax on accumulators.
Spread syntax should be avoided on accumulators (like those in .reduce
) because it causes a time complexity of O(n^2)
.
Consider methods such as .splice or .push instead.
(lint/performance/noAccumulatingSpread)
ssr: false, | ||
}); | ||
|
||
export default function () { |
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.
🧹 Nitpick (assertive)
Name the default export function
Naming the default export function improves stack traces and debugging.
-export default function () {
+export default function BabylonPage() {
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export default function () { | |
export default function BabylonPage() { |
import dynamic from 'next/dynamic'; | ||
import PageLayout from '../../components/PageLayout'; | ||
|
||
// injected provider works only if nextjs ssr disabled |
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.
🧹 Nitpick (assertive)
Clarify the comment
Adjust the comment for clarity and proper capitalization.
-/* injected provider works only if nextjs ssr disabled */
+/* Injected provider works only if Next.js SSR is disabled */
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
// injected provider works only if nextjs ssr disabled | |
/* Injected provider works only if Next.js SSR is disabled */ |
@@ -0,0 +1,10 @@ | |||
export const dapps = [ |
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.
🧹 Nitpick (assertive)
Add TypeScript interface for dApp configuration
Define an interface for better type safety and documentation.
+interface DApp {
+ name: string;
+ url: string;
+}
+
-export const dapps = [
+export const dapps: DApp[] = [
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export const dapps = [ | |
interface DApp { | |
name: string; | |
url: string; | |
} | |
export const dapps: DApp[] = [ |
@@ -0,0 +1,9 @@ | |||
import type { BBNProviderCosmos } from '@onekeyfe/onekey-cosmos-provider'; | |||
|
|||
export type IProviderApi = BBNProviderCosmos |
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.
🧹 Nitpick (assertive)
Add JSDoc comment for the type alias
Add a brief description of what this provider API represents and its purpose.
+/** Babylon Cosmos Provider API type for handling wallet interactions */
export type IProviderApi = BBNProviderCosmos
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export type IProviderApi = BBNProviderCosmos | |
/** Babylon Cosmos Provider API type for handling wallet interactions */ | |
export type IProviderApi = BBNProviderCosmos |
export interface IProviderInfo { | ||
uuid: string; | ||
name: string; | ||
inject?: string; // window.ethereum | ||
} |
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.
🧹 Nitpick (assertive)
Improve interface documentation and clarity
The interface needs proper documentation, and the inject
property's purpose should be clearer.
+/**
+ * Provider information interface for Babylon chain integration
+ */
export interface IProviderInfo {
+ /** Unique identifier for the provider */
uuid: string;
+ /** Display name of the provider */
name: string;
+ /** Optional injection path for the provider (e.g., window.ethereum) */
- inject?: string; // window.ethereum
+ inject?: string;
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface IProviderInfo { | |
uuid: string; | |
name: string; | |
inject?: string; // window.ethereum | |
} | |
/** | |
* Provider information interface for Babylon chain integration | |
*/ | |
export interface IProviderInfo { | |
/** Unique identifier for the provider */ | |
uuid: string; | |
/** Display name of the provider */ | |
name: string; | |
/** Optional injection path for the provider (e.g., window.ethereum) */ | |
inject?: string; | |
} |
b370884
to
28c9eec
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: 2
♻️ Duplicate comments (3)
packages/example/components/chains/babylon/dapps.config.ts (1)
1-10
: 🧹 Nitpick (assertive)Add TypeScript interface for better type safety
Define an interface for the dApp configuration.
+interface DApp { + name: string; + url: string; +} + -export const dapps = [ +export const dapps: DApp[] = [packages/example/components/chains/babylon/types.ts (2)
3-3
: 🧹 Nitpick (assertive)Add JSDoc comment for the provider API type
Add a description of what this provider API represents.
+/** Babylon Cosmos Provider API type for handling wallet interactions */ export type IProviderApi = BBNProviderCosmos
5-9
: 🧹 Nitpick (assertive)Document the provider info interface
Add JSDoc comments to explain the interface and its properties.
+/** + * Provider information interface for Babylon chain integration + */ export interface IProviderInfo { + /** Unique identifier for the provider */ uuid: string; + /** Display name of the provider */ name: string; + /** Optional injection path for the provider (e.g., window.ethereum) */ inject?: string; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
packages/example/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (8)
packages/core/src/versionInfo.ts
(1 hunks)packages/example/chains.ts
(1 hunks)packages/example/components/chains/babylon/dapps.config.ts
(1 hunks)packages/example/components/chains/babylon/example.tsx
(1 hunks)packages/example/components/chains/babylon/types.ts
(1 hunks)packages/example/package.json
(2 hunks)packages/example/pages/babylon/index.tsx
(1 hunks)packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts
(2 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
packages/example/components/chains/babylon/example.tsx
[error] 53-53: Avoid the use of spread (...
) syntax on accumulators.
Spread syntax should be avoided on accumulators (like those in .reduce
) because it causes a time complexity of O(n^2)
.
Consider methods such as .splice or .push instead.
(lint/performance/noAccumulatingSpread)
[error] 409-409: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
[error] 411-411: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
[error] 473-473: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
[error] 475-476: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: test_build_web
- GitHub Check: lint (ubuntu-latest, 20)
🔇 Additional comments (13)
packages/example/components/chains/babylon/example.tsx (7)
53-55
: Avoid using spread operator in reduce for better performanceUsing the spread operator in a
reduce
function can hurt performance because it creates a new object on each iteration. Modify the accumulator directly to improve efficiency.Apply this diff to optimize the code:
- return Object.entries(obj) - .filter(([, v]) => v != null) - .reduce( - (acc, [k, v]) => ({ - ...acc, - [k]: v === Object(v) && !Array.isArray(v) ? removeNull(v) : v, - }), - {}, - ); + const acc = {}; + for (const [k, v] of Object.entries(obj)) { + if (v != null) { + acc[k] = v === Object(v) && !Array.isArray(v) ? removeNull(v) : v; + } + } + return acc;🧰 Tools
🪛 Biome (1.9.4)
[error] 53-53: Avoid the use of spread (
...
) syntax on accumulators.Spread syntax should be avoided on accumulators (like those in
.reduce
) because it causes a time complexity ofO(n^2)
.
Consider methods such as .splice or .push instead.(lint/performance/noAccumulatingSpread)
76-76
: Remove unnecessary console.log statementDelete the debug
console.log
statement to clean up the code.Apply this diff:
- console.log('providers', providers);
80-81
: Remove unnecessary console.log statementsDelete these debug
console.log
statements to tidy up the code.Apply this diff:
- console.log('providerBitcoin', providerBitcoin); - console.log('providerCosmos', providerCosmos);
102-103
: Reject promises with Error objectsRejecting a promise with a string omits the stack trace. Use an
Error
object instead.Apply this diff:
- return Promise.reject('Wallet not found'); + return Promise.reject(new Error('Wallet not found'));
107-107
: Remove unnecessary console.log statementDelete the debug
console.log
statement to clean up the code.Apply this diff:
- console.log('xxxx', result);
416-417
: UseNumber.parseInt
instead ofparseInt
Replace the global
parseInt
withNumber.parseInt
for consistency.Apply this diff:
- const amount = parseInt(fromData['amount'] as string); - const gasPrice = parseInt((fromData['gasPrice'] as string) ?? '20'); + const amount = Number.parseInt(fromData['amount'] as string); + const gasPrice = Number.parseInt((fromData['gasPrice'] as string) ?? '20');Also applies to: 468-469
468-469
: UseNumber.parseInt
instead ofparseInt
Replace the global
parseInt
withNumber.parseInt
for consistency.Apply this diff:
- const amount = parseInt(fromData['amount'] as string); - const gasPrice = parseInt((fromData['gasPrice'] as string) ?? '20'); + const amount = Number.parseInt(fromData['amount'] as string); + const gasPrice = Number.parseInt((fromData['gasPrice'] as string) ?? '20');packages/example/pages/babylon/index.tsx (2)
5-5
: Clarify the commentAdjust the comment for clarity and proper capitalization.
Apply this diff:
-// injected provider works only if nextjs ssr disabled +// Injected provider works only if Next.js SSR is disabled
10-10
: Name the default export functionNaming the default export function improves stack traces and debugging.
Apply this diff:
-export default function () { +export default function BabylonPage() {packages/example/chains.ts (1)
70-75
: LGTM!The new Babylon chain entry is added correctly.
packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts (1)
38-39
: Clean version management implementation!Good job delegating version management to the base provider. The initialization looks solid.
Also applies to: 60-60
packages/core/src/versionInfo.ts (1)
2-2
: Version bump looks goodClean version increment following semantic versioning.
packages/example/package.json (1)
26-26
: Check dependencies for security and compatibility.The new dependencies align with the PR objectives for Babylon chain support. Let's verify their security and compatibility.
Also applies to: 28-28, 69-69
✅ Verification successful
Consider updating @cosmjs/stargate and @keystonehq/keystone-sdk
Your dependencies are stable and React-compatible, but two packages have newer versions:
- @cosmjs/stargate: ^0.32.4 → 0.33.0
- @keystonehq/keystone-sdk: ^0.9.1 → 0.9.2
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check dependencies for latest versions and security advisories # Check latest versions echo "Checking latest versions..." for pkg in "@cosmjs/stargate" "@keystonehq/keystone-sdk" "@tomo-inc/wallet-connect-sdk"; do echo "Package: $pkg" npm view $pkg version done # Check for peer dependencies echo -e "\nChecking peer dependencies..." for pkg in "@cosmjs/stargate" "@keystonehq/keystone-sdk" "@tomo-inc/wallet-connect-sdk"; do echo "Package: $pkg" npm view $pkg peerDependencies done # Check for security advisories echo -e "\nChecking security advisories..." for pkg in "@cosmjs/stargate" "@keystonehq/keystone-sdk" "@tomo-inc/wallet-connect-sdk"; do echo "Package: $pkg" npm audit $pkg doneLength of output: 3191
Script:
#!/bin/bash # Check React version and search for potential security issues echo "Checking React version..." rg '"react":\s*"([^"]+)"' packages/example/package.json echo -e "\nChecking for known vulnerabilities in GitHub Advisory Database..." gh api /repos/cosmos/cosmjs/security-advisories --jq '.[].summary' gh api /repos/KeystoneHQ/keystone-sdk/security-advisories --jq '.[].summary'Length of output: 551
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-unsafe-call */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-return */ |
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.
🧹 Nitpick (assertive)
Avoid extensive use of ESLint disable comments
Using multiple eslint-disable
comments at the top may hide potential issues. Consider resolving the linting errors instead of disabling them.
@@ -23,7 +23,9 @@ | |||
"@codemirror/lang-json": "^6.0.1", | |||
"@codemirror/lint": "^6.8.0", | |||
"@cosmjs/amino": "^0.32.3", | |||
"@cosmjs/stargate": "^0.32.4", |
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.
🧹 Nitpick (assertive)
Verify @cosmjs version compatibility.
You have @cosmjs/amino at ^0.32.3 but @cosmjs/stargate at ^0.32.4. Consider aligning these versions.
- "@cosmjs/amino": "^0.32.3",
+ "@cosmjs/amino": "^0.32.4",
Committable suggestion skipped: line range outside the PR's diff.
Summary by CodeRabbit
Release Notes
Version Update
New Features
Dependencies