Skip to content

Comments

Release: 2.4.2#627

Merged
kvhnuke merged 6 commits intomainfrom
develop
Mar 10, 2025
Merged

Release: 2.4.2#627
kvhnuke merged 6 commits intomainfrom
develop

Conversation

@kvhnuke
Copy link
Contributor

@kvhnuke kvhnuke commented Mar 10, 2025

Summary by CodeRabbit

  • New Features

    • Introduced support for the Kaia network across the application, replacing the legacy option.
    • Enhanced network connectivity for Scroll by switching from an HTTP to a WebSocket endpoint.
  • Bug Fixes / Enhancements

    • Refined token display logic to ensure only valid token images load correctly.
  • Chores

    • Updated package and dependency versions for improved performance and compatibility.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2025

Walkthrough

This pull request introduces multiple configuration updates across the codebase. The package version for @enkryptcom/extension is bumped from 2.4.1 to 2.4.2, and network references are updated to replace "Klaytn" with "Kaia" in various Ethereum- and swap-related files. A deprecated Klaytn network configuration is removed and replaced by a new Kaia configuration file. Additionally, the Scroll network endpoint is changed from an HTTP to a WebSocket URL, a token icon check is refined in the Solana API, and dependency versions for Trezor packages in the hardware wallets module are updated.

Changes

File(s) Change Summary
packages/extension/package.json Updated @enkryptcom/extension version from 2.4.1 to 2.4.2.
packages/hw-wallets/package.json Updated dependency versions for @trezor/connect and @trezor/connect-webextension from ^9.4.7 to ^9.5.1.
packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts
packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts
packages/extension/src/providers/ethereum/networks/index.ts
packages/extension/src/providers/ethereum/networks/klay.ts
packages/extension/src/providers/ethereum/networks/kaia.ts
Replaced references to NetworkNames.Klaytn with NetworkNames.Kaia and updated corresponding Coingecko platform values. Removed the legacy Klaytn configuration (klay.ts) and added a new Kaia configuration file (kaia.ts).
packages/extension/src/providers/ethereum/networks/scroll.ts Updated the Scroll network endpoint from an HTTP URL to a WebSocket URL (wss://scroll-rpc.publicnode.com).
packages/extension/src/providers/solana/libs/api.ts Enhanced the token icon assignment logic by adding an extra check for a valid URI in the token files array.
packages/swap/src/common/supportedNetworks.ts
packages/swap/src/types/index.ts
Removed the Klaytn entry and added a corresponding Kaia entry with updated properties and enum mapping.
packages/types/src/networks.ts Renamed enum entries from Klaytn to Kaia in both NetworkNames and CoingeckoPlatform.

Possibly related PRs

  • devop: set correct version #600 – Updates the @enkryptcom/extension package version (from 2.0.3 to 2.1.0), relating to the version bump in this PR.
  • fix: klayton and images #624 – Involves renaming network references from NetworkNames.Klaytn to NetworkNames.Kaia across multiple modules.
  • Release: v2.4.1 #623 – Updates the package version (from 2.4.0 to 2.4.1) in the same package, similar to the version update performed here.

Suggested reviewers

  • NickKelly1
  • SemajaM8
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

github-actions bot commented Mar 10, 2025

💼 Build Files
chrome: enkrypt-chrome-e3fca1eb.zip
firefox: enkrypt-firefox-e3fca1eb.zip

💉 Virus total analysis
chrome: e3fca1eb
firefox: e3fca1eb

Copy link

@coderabbitai coderabbitai bot left a 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/extension/src/providers/ethereum/networks/index.ts (1)

27-104: 💡 Verification agent

🧩 Analysis chain

Verify all references to Klaytn/Kaia have been updated consistently.

This change is part of renaming Klaytn to Kaia across the codebase. Let's verify that all references have been consistently updated to avoid any missing instances.


🏁 Script executed:

#!/bin/bash
# Search for any remaining references to Klaytn or KLAY
echo "Searching for remaining references to Klaytn..."
rg -i "klaytn|klay" --type ts --type js --type json

echo -e "\nVerifying Kaia references..."
rg -i "kaia" --type ts --type js --type json

Length of output: 3602


Action Required: Update Remaining "Klaytn" References to "Kaia" Consistently

The changes in the extension’s Ethereum networks file (e.g. using kaiaNode and mapping kaia: kaiaNode) are correct. However, running the search reveals that several other parts of the codebase still reference "Klaytn" (or its shorthand "klay") instead of "Kaia". Please review the following areas and update them if the renaming is intended to be global:

  • packages/types/src/networks.ts

    • Found a line like Kaia = "klay-token", which mixes the new property name with an outdated identifier.
  • packages/swap/src/configs.ts and packages/swap/src/providers/oneInch/index.ts

    • These files still reference [NetworkNames.Klaytn] and [SupportedNetworkName.Klaytn].
  • packages/extension/src/libs/dapp-list/index.ts

    • References [NetworkNames.Klaytn] and a URL pointing to klay.json.
  • packages/hw-wallets/src/ledger/ethereum/configs.ts and packages/hw-wallets/src/trezor/ethereum/configs.ts

    • Both have entries like [NetworkNames.Klaytn]: DEFAULT_PATHS.
  • Other asset handlers in the extension (e.g., assetinfo-mew.ts, token-lists.ts)

    • There are still usages such as tbName: 'klay' and URLs referencing Klaytn-specific endpoints.

Please verify whether these should be updated to "Kaia" as part of the renaming effort or if any exceptions apply. Ensuring that the naming is consistent across all files will help avoid confusion and potential misconfigurations.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6b0fb06 and e3fca1e.

⛔ Files ignored due to path filters (3)
  • packages/extension/src/providers/ethereum/networks/icons/kaia.png is excluded by !**/*.png
  • packages/extension/src/providers/ethereum/networks/icons/klaytn.png is excluded by !**/*.png
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (12)
  • packages/extension/package.json (1 hunks)
  • packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts (1 hunks)
  • packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/index.ts (2 hunks)
  • packages/extension/src/providers/ethereum/networks/kaia.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/klay.ts (0 hunks)
  • packages/extension/src/providers/ethereum/networks/scroll.ts (1 hunks)
  • packages/extension/src/providers/solana/libs/api.ts (1 hunks)
  • packages/hw-wallets/package.json (1 hunks)
  • packages/swap/src/common/supportedNetworks.ts (1 hunks)
  • packages/swap/src/types/index.ts (1 hunks)
  • packages/types/src/networks.ts (2 hunks)
💤 Files with no reviewable changes (1)
  • packages/extension/src/providers/ethereum/networks/klay.ts
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: buildAll
  • GitHub Check: test
🔇 Additional comments (14)
packages/extension/package.json (1)

3-3: Version bump looks good

The package version has been incremented from 2.4.1 to 2.4.2, which aligns with the PR title "Release: 2.4.2". This follows semantic versioning for patch releases.

packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts (1)

46-46: Network name update is consistent

The replacement of NetworkNames.Klaytn with NetworkNames.Kaia in the SupportedNetworkNames type is consistent with the network transition described in the PR summary.

packages/extension/src/providers/ethereum/networks/scroll.ts (1)

19-19:

Details

✅ Verification successful

Endpoint update from HTTP to WebSocket

The node endpoint for Scroll network has been changed from HTTP (https://scroll.api.onfinality.io/public) to WebSocket (wss://scroll-rpc.publicnode.com). This change enables real-time data transmission and is generally beneficial for blockchain interactions.


🌐 Web query:

Is wss://scroll-rpc.publicnode.com a reliable public RPC endpoint for Scroll?

💡 Result:

wss://scroll-rpc.publicnode.com is a reliable public RPC endpoint for Scroll, based on several indicators from search results:

1. High Usage and Performance Metrics

  • Handled 8.28 million total requests with 95.87 average requests per second over 24 hours[4].
  • Operated by Public Node, which serves 4.57 billion daily requests across 104 blockchains[8], demonstrating scalable infrastructure.

2. Trusted Provider Reputation

  • Public Node emphasizes privacy-first, free access, and reliability across its network[4][8].
  • Listed in community resources like the awesome-list-rpc-nodes-providers GitHub repository[6][13], which aggregates vetted blockchain infrastructure.

3. Multi-Chain Support

  • Public Node maintains endpoints for major networks (Polygon, BSC, Avalanche)[11][8], indicating experience with high-demand environments.

4. Scroll Ecosystem Alignment

  • While Scroll's official documentation[5] recommends their own RPC, third-party endpoints like Public Node are widely used for redundancy and performance.

For critical applications, consider combining this endpoint with alternatives like:

  • Ankr (https://scroll-rpc.publicnode.com)[3]
  • QuickNode (scroll-mainnet.quiknode.pro)[2]
  • Blast API (https://blastapi.io/public-api/scroll)[1]

Always monitor latency and error rates, as public endpoints can experience variable loads[9]. Enterprise projects might benefit from dedicated nodes via services like Chainstack[14] or Scroll's own l2geth implementation[5].

Citations:


Verified Endpoint Update: Reliable WebSocket for Scroll
The update replacing the HTTP endpoint with the WebSocket endpoint is correct. The new endpoint, wss://scroll-rpc.publicnode.com, is confirmed as reliable for the Scroll network based on public usage and performance metrics.

  • The code change on line 19 in packages/extension/src/providers/ethereum/networks/scroll.ts is appropriate.
  • No further modifications are needed.
packages/swap/src/types/index.ts (1)

28-28: Network enum update is consistent

The replacement of Klaytn with Kaia in the SupportedNetworkName enum is consistent with the network transition described in the PR summary and aligns with changes made in other files.

packages/hw-wallets/package.json (1)

63-64:

Details

✅ Verification successful

Trezor dependency updates look good.

The Trezor dependencies have been updated from version 9.4.7 to 9.5.1, which is a good practice to keep dependencies up-to-date with the latest features and security patches.


🌐 Web query:

What are the changes in Trezor Connect from version 9.4.7 to 9.5.1?

💡 Result:

Trezor Connect's updates from version 9.4.7 to 9.5.1 follow its standardized versioning strategy, though specific changelog details for these exact versions aren't explicitly documented in the provided sources. Based on Trezor's versioning conventions[1][3][8]:

Versioning Context

  • Major versions (e.g., v8 → v9) introduce breaking API changes and are maintained for 12 months[1].
  • Minor versions (e.g., 9.4 → 9.5) add:
    • API functionality expansions
    • npm package updates[1]
  • Patch versions (e.g., 9.5.0 → 9.5.1) address:
    • Bug fixes
    • Security updates
    • Backend optimizations[1][3]

Key Inferences for 9.4.7 → 9.5.1

  1. TypeScript Enhancements
    Version 9.5.1 includes updated TypeScript definitions for device interactions (DeviceList.d.ts), improving developer experience[19][20].

  2. Beta Channel Features
    The 9.5.x cycle introduced beta releases (e.g., 9.5.1-beta.1), suggesting experimental features or pre-release testing[19].

  3. CDN Deployment
    Updates are distributed via standardized CDN endpoints (https://connect.trezor.io/9.x.x/trezor-connect.js)[1][14][16].

For precise release notes, developers should monitor Trezor's official GitHub repository[3] or npm changelogs, as the provided sources don't detail incremental changes between these specific patch versions.

Citations:


Trezor Dependency Update Approved

The Trezor dependencies in packages/hw-wallets/package.json have been successfully updated from version 9.4.7 to 9.5.1. The update aligns with Trezor’s versioning practices, bringing along improvements such as updated TypeScript definitions for device interactions, introduction of beta features, and standardized CDN deployment. This update not only keeps the dependencies current with the latest security patches and enhancements but also maintains API stability.

  • Location: packages/hw-wallets/package.json (Lines 63-64)
  • Changes Verified:
    • Updated Trezor Connect from 9.4.7 to 9.5.1, ensuring enhanced TypeScript definitions and bug/security fixes.
    • Maintains the expected functionality with additional benefits from beta channel features and standardized deployment practices.

Overall, the dependency update is good to go.

packages/extension/src/providers/ethereum/networks/kaia.ts (3)

1-27: New Kaia network configuration looks good.

The implementation properly defines all necessary network parameters for the Kaia network, replacing the previous Klaytn configuration. The file includes appropriate imports, network options, and exports a properly configured EvmNetwork instance.


17-17:

Details

✅ Verification successful

Verify RPC endpoint reliability.

The public RPC node URL is set to BlockPI's network. Ensure this endpoint has been tested for reliability and performance.


🏁 Script executed:

#!/bin/bash
# Check if the Kaia RPC endpoint is responsive
curl -s -X POST "https://kaia.blockpi.network/v1/rpc/public" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | jq

Length of output: 229


RPC Endpoint Verified for Reliability

The Kaia network public RPC endpoint (https://kaia.blockpi.network/v1/rpc/public) has been tested using the provided script, and it returned a valid block number response. No further changes are required at this time.


19-20:

Details

✅ Verification successful

Verify Coingecko parameters.

Make sure the Coingecko ID "kaia" and the platform value are correct for proper price tracking.


🌐 Web query:

Does Coingecko support "kaia" as a coin ID?

💡 Result:

Yes, CoinGecko does support Kaia (KAIA) as a coin ID. The platform provides real-time price tracking, market data, and exchange listings for KAIA, which is the native token of the Kaia blockchain formed from the merger of Klaytn and Finschia[10][11].

Key details available on CoinGecko include:

  • Current price: $0.1061 (as of latest data)[10]
  • 24-hour trading volume: $15.4 million[10]
  • Market cap rank: #7203 (for one listing) and #46 blockchain by TVL[12][11]
  • Historical charts showing price fluctuations and all-time highs/lows[10][4]

The KAIA token has multiple listings on decentralized exchanges like DragonSwap V3 (Kaia), with trading pairs against wrapped KLAY and other assets[8][4]. However, users should note that another unrelated project called "Illusive AI" also uses the KAIA ticker on CoinGecko, creating potential confusion[2][13]. Always verify project details through official channels when trading.

Citations:


Verified CoinGecko ID and platform settings are correct.
The CoinGecko coin ID "kaia" is indeed supported, and the platform value (CoingeckoPlatform.Kaia) aligns with the supported configuration for proper price tracking. No further changes are needed for these parameters.

  • File: packages/extension/src/providers/ethereum/networks/kaia.ts (lines 19-20)
    • coingeckoID: 'kaia'
    • coingeckoPlatform: CoingeckoPlatform.Kaia
packages/types/src/networks.ts (1)

50-50: Network name change from Klaytn to Kaia.

The enum value has been appropriately updated from Klaytn to Kaia, which aligns with the network rebranding.

packages/extension/src/providers/ethereum/networks/index.ts (2)

27-27: Import path correctly updated for Kaia.

The import statement has been updated to reference the new Kaia network file.


104-104: Network mapping updated from Klaytn to Kaia.

The exported object now correctly maps to the Kaia network instead of Klaytn.

packages/extension/src/providers/solana/libs/api.ts (1)

107-108: Improved error handling for token icon display

This change adds proper validation to ensure the token icon is only set when there's a valid URI in the files array. It prevents potential runtime errors by checking both the array length and URI existence before attempting to access them.

packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts (1)

97-99: Network rename from Klaytn to Kaia

The change replaces Klaytn with Kaia while maintaining the same token balance name (tbName: 'klay') for backward compatibility. This is consistent with the broader network rebranding across the codebase.

packages/swap/src/common/supportedNetworks.ts (1)

140-147: Network configuration updated from Klaytn to Kaia

This change effectively replaces the Klaytn network with Kaia in the supported networks configuration. The implementation properly updates all network identifiers including id, cgId, name, and symbol while maintaining the same technical parameters such as decimals, logoURI, rank, signerType, and type.

@kvhnuke kvhnuke merged commit 0e603c7 into main Mar 10, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants