Skip to content

Release: v2.7.0#684

Merged
kvhnuke merged 51 commits intodevelopfrom
devop/packeupdates-0512
May 16, 2025
Merged

Release: v2.7.0#684
kvhnuke merged 51 commits intodevelopfrom
devop/packeupdates-0512

Conversation

@kvhnuke
Copy link
Contributor

@kvhnuke kvhnuke commented May 12, 2025

Summary by CodeRabbit

  • Chores
    • Updated various dependencies and development tools across multiple packages to newer versions for improved stability and compatibility.
  • Refactor
    • Removed an unused import in the Solana send transaction user interface.
    • Simplified Jupiter provider referral fee handling by removing custom referral program logic and adopting standard token account management.
    • Centralized rate popup state management using a Pinia store and updated related UI components accordingly.
  • Configuration
    • Updated referrer addresses for Jupiter provider fee configurations for specific wallets.
  • New Features
    • Added support for the Conflux blockchain network, including NFT fetching, network configuration, asset handling, and activity tracking integration.
    • Introduced new Ethereum-compatible networks: Derive, Unit Zero, Unit Zero Testnet, and Cytonic Testnet.
    • Added conditional token selection in Ethereum and Solana send transaction interfaces based on token parameter data.
    • Implemented a user rating popup triggered after successful transactions in multiple blockchain providers and the swap interface.
    • Added a new asset detail action component with Buy/Sell, Send, and Swap buttons and integrated buy action events across asset views.

@coderabbitai
Copy link

coderabbitai bot commented May 12, 2025

## Walkthrough

This update consists of routine version bumps for both dependencies and development dependencies across multiple package.json files in the repository. No code logic, scripts, or configuration files were altered, except for a single import removal in a Vue component, modifications in the swap package to update Jupiter referral addresses and simplify referral token account handling by removing custom Jupiter referral program logic, and the addition of Conflux network support including NFT handlers, type definitions, network configuration, and integration in Ethereum provider modules.

## Changes

| File(s)                                                                                   | Change Summary                                                                                                                   |
|-------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| package.json                                                                              | Updated devDependencies: bumped versions of @commitlint/cli, @commitlint/config-conventional, @swc/core, and nodemon.            |
| packages/extension-bridge/package.json                                                    | Bumped devDependencies: @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint, eslint-config-prettier, type-fest, typescript-eslint. |
| packages/extension/package.json                                                           | Updated multiple dependencies and devDependencies: several @amplitude, @polkadot, @solana, and other libraries received version bumps. |
| packages/extension/src/providers/solana/ui/send-transaction/index.vue                     | Removed unused import of formatFiatValue from number-formatter utility; renamed variable `paramNFTData` to `tokenParamData`; updated token selection logic to preselect token based on route parameter. |
| packages/hw-wallets/package.json                                                          | Bumped runtime and devDependencies: @ledgerhq/hw-app-eth, @polkadot/types, @zondax/ledger-substrate, and various dev tools.      |
| packages/keyring/package.json<br>packages/name-resolution/package.json<br>packages/signers/bitcoin/package.json<br>packages/signers/ethereum/package.json<br>packages/signers/kadena/package.json<br>packages/storage/package.json<br>packages/types/package.json<br>packages/utils/package.json | Bumped devDependencies: @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint, eslint-config-prettier, typescript-eslint, vitest (where present). |
| packages/request/package.json                                                             | Updated ws dependency and bumped multiple devDependencies.                                                                       |
| packages/signers/polkadot/package.json                                                    | Updated @commitlint/cli and several devDependencies to newer versions.                                                           |
| packages/swap/package.json                                                                | Updated dependencies: @solana/web3.js, bignumber.js, rango-sdk-basic, ws; bumped multiple devDependencies.                       |
| packages/swap/src/configs.ts                                                              | Updated Jupiter provider referrer addresses for enkrypt and mew wallets; fee percentages unchanged.                              |
| packages/swap/src/providers/jupiter/index.ts                                             | Removed Jupiter referral program constants and custom referral logic; corrected referral fee calculations; replaced referral ATA creation with standard SPL token ATA creation; updated function signatures accordingly. |
| packages/extension/src/libs/nft-handlers/conflux.ts                                      | Added new module to fetch and process NFT collections and items from the Conflux blockchain via ConfluxScan API with caching and error handling. |
| packages/extension/src/libs/nft-handlers/types/conflux.ts                                | Added TypeScript interfaces defining Conflux NFT data structures and API response formats.                                        |
| packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts | Added Conflux network endpoint URL to the Etherscan-compatible activity handler configuration.                                    |
| packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts           | Added Conflux network support entry with token balance name and Coingecko platform identifier.                                    |
| packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts  | Extended SupportedNetworkNames type alias to include Conflux.                                                                      |
| packages/extension/src/providers/ethereum/networks/conflux.ts                            | Added new EvmNetwork configuration for the Conflux eSpace blockchain with network details, RPC, explorers, and handlers.          |
| packages/extension/src/providers/ethereum/networks/index.ts                             | Imported and registered the Conflux network configuration in the Ethereum networks export.                                        |
| packages/types/src/networks.ts                                                           | Extended NetworkNames and CoingeckoPlatform enums to include Conflux identifiers.                                                 |
| packages/extension/src/libs/rate-state/index.ts                                          | Updated `showPopup` method to accept an optional `immediate` parameter; added `askedAfterActivity` state flag and refined popup timing logic. |
| packages/extension/src/libs/rate-state/types.ts                                          | Added `askedAfterActivity` boolean property to the `Rate` interface.                                                              |
| packages/extension/src/providers/bitcoin/ui/send-transaction/verify-transaction/index.vue | Added rating popup trigger after successful transaction send via `RateState` and rate store integration.                         |
| packages/extension/src/providers/ethereum/ui/send-transaction/index.vue                  | Renamed variable `paramNFTData` to `tokenParamData`; updated token selection logic to preselect token based on route parameter.   |
| packages/extension/src/providers/ethereum/ui/send-transaction/verify-transaction/index.vue | Added rating popup trigger after successful transaction send using `RateState` and rate store.                                    |
| packages/extension/src/providers/kadena/ui/send-transaction/verify-transaction/index.vue | Added rating popup trigger after successful transaction send using `RateState` and rate store.                                    |
| packages/extension/src/providers/polkadot/ui/send-transaction/verify-transaction/index.vue | Added rating popup trigger after successful transaction send using `RateState` and rate store.                                    |
| packages/extension/src/providers/solana/ui/send-transaction/verify-transaction/index.vue | Added rating popup trigger after successful transaction send using `RateState` and rate store.                                    |
| packages/extension/src/ui/action/App.vue                                                 | Replaced local reactive rate popup state with Pinia store state; updated bindings and methods to use store.                       |
| packages/extension/src/ui/action/store/rate-store.ts                                    | Added new Pinia store `useRateStore` managing `isRatePopupOpen` state and `toggleRatePopup` action.                                |
| packages/extension/src/ui/action/views/asset-detail-view/components/asset-detail-action.vue | Added new Vue component with Buy/Sell, Send, and Swap buttons for asset actions; emits events for deposit toggle and buy action.  |
| packages/extension/src/ui/action/views/asset-detail-view/index.vue                       | Added conditional rendering for token balance and asset-detail-action component based on `isCustomToken`; added event and handler for buy action. |
| packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue | Added event listener and emitter for `open:buy-action` event to propagate buy action requests.                                    |
| packages/extension/src/ui/action/views/network-assets/index.vue                         | Added `v-bind="$attrs"` to `network-assets-item` components to pass down inherited attributes.                                    |
| packages/extension/src/ui/action/views/swap/views/swap-best-offer/index.vue              | Added rating popup trigger on closing swap best offer view using `RateState` and rate store.                                      |
| packages/extension/src/providers/common/libs/new-features.ts                            | Added `Derive`, `Conflux`, and `UnitZero` to exported `newNetworks` array.                                                        |
| packages/extension/src/providers/ethereum/networks/derive.ts                            | Added new EvmNetwork configuration for the Derive network with metadata, RPC, explorers, and activity handler.                    |
| packages/extension/src/providers/ethereum/networks/unitzero-testnet.ts                   | Added new EvmNetwork configuration for the Unit Zero Testnet with metadata, RPC, explorers, and stubbed activity handler.         |
| packages/extension/src/providers/ethereum/networks/unitzero.ts                          | Added new EvmNetwork configuration for the Unit Zero network with metadata, RPC, explorers, Coingecko ID, and stubbed activity handler. |
| README.md                                                                                | Updated "Currently Supported Chains" section to include Derive, Unit Zero, and Unit Zero Testnet networks.                        |

## Possibly related PRs

- enkryptcom/enKrypt#669: Adds Unit Zero and Unit Zero Testnet network configurations, imports, exports, and documentation updates.
- enkryptcom/enKrypt#680: Introduces the Derive network with matching network configuration, enums, activity endpoints, and README updates.
- enkryptcom/enKrypt#683: Adds Conflux network support including NFT handlers, network configurations, type definitions, and asset handler updates.

## Suggested reviewers

- gamalielhere
- olgakup

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between ee55d1a and 3e375a2.

📒 Files selected for processing (1)
  • packages/hw-wallets/package.json (4 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/hw-wallets/package.json
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: buildAll
  • GitHub Check: test
  • GitHub Check: test

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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need 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)

  • @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 generate sequence diagram to generate a sequence diagram of the changes in 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 May 12, 2025

💼 Build Files
chrome: enkrypt-chrome-3e375a2b.zip
firefox: enkrypt-firefox-3e375a2b.zip

💉 Virus total analysis
chrome: 3e375a2b
firefox: 3e375a2b

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: 0

🧹 Nitpick comments (4)
packages/hw-wallets/package.json (1)

39-39: Consistent version specifier for typescript-eslint.
The typescript-eslint package is pinned without a caret ("8.32.1"), while other devDependencies use caret prefixes. Consider updating for consistency:

-"typescript-eslint": "8.32.1",
+"typescript-eslint": "^8.32.1",
packages/swap/package.json (1)

56-56: Consistent version specifier for typescript-eslint.
Consider using a caret prefix for typescript-eslint to allow future patch updates:

-"typescript-eslint": "8.32.1",
+"typescript-eslint": "^8.32.1",
packages/extension-bridge/package.json (1)

64-64: Consistent version specifier for typescript-eslint.
The typescript-eslint package is pinned without a caret. Consistency with other dependencies is recommended:

-"typescript-eslint": "8.32.1"
+"typescript-eslint": "^8.32.1"
packages/signers/polkadot/package.json (1)

48-48: Consistent version specifier for typescript-eslint.
Pinning typescript-eslint without a caret may prevent patch updates. Consider:

-"typescript-eslint": "8.32.1",
+"typescript-eslint": "^8.32.1",
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ef577dc and 77cda44.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (16)
  • package.json (1 hunks)
  • packages/extension-bridge/package.json (1 hunks)
  • packages/extension/package.json (4 hunks)
  • packages/extension/src/providers/solana/ui/send-transaction/index.vue (0 hunks)
  • packages/hw-wallets/package.json (3 hunks)
  • packages/keyring/package.json (2 hunks)
  • packages/name-resolution/package.json (2 hunks)
  • packages/request/package.json (2 hunks)
  • packages/signers/bitcoin/package.json (2 hunks)
  • packages/signers/ethereum/package.json (2 hunks)
  • packages/signers/kadena/package.json (2 hunks)
  • packages/signers/polkadot/package.json (3 hunks)
  • packages/storage/package.json (2 hunks)
  • packages/swap/package.json (2 hunks)
  • packages/types/package.json (2 hunks)
  • packages/utils/package.json (2 hunks)
💤 Files with no reviewable changes (1)
  • packages/extension/src/providers/solana/ui/send-transaction/index.vue
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: buildAll
  • GitHub Check: test
  • GitHub Check: test
🔇 Additional comments (38)
packages/types/package.json (2)

27-30: Approve bump of TypeScript and ESLint devDependencies
The updates to @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint, and eslint-config-prettier align with the monorepo’s tooling upgrades and do not introduce breaking changes.

Also applies to: 32-32


41-41: Verify pinning strategy for typescript-eslint
The typescript-eslint dependency is pinned exactly to 8.32.1 (no caret) unlike other dev dependencies. Confirm whether this omission of ^ is intentional or should be updated for consistency.

packages/signers/bitcoin/package.json (3)

35-38: Approve bump of TypeScript and ESLint devDependencies
Updating @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, and eslint to their latest compatible versions supports the monorepo consistency.


40-40: Approve update of Prettier integration
Bumping eslint-config-prettier to ^10.1.5 ensures that Prettier formatting rules take precedence without conflict.


49-50: Vitest bump & verify pinning strategy for typescript-eslint
vitest has been upgraded to ^3.1.3; please ensure all tests pass. The typescript-eslint dependency remains pinned exactly to 8.32.1 (no caret), as noted above—confirm if this is intentional.

packages/signers/kadena/package.json (3)

33-36: Approve bump of TypeScript and ESLint devDependencies
The versions for @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, and eslint have been updated consistently; no breaking changes are expected.


38-38: Approve update of Prettier integration
Upgrading eslint-config-prettier to ^10.1.5 aligns Prettier with the latest ESLint rules.


47-48: Vitest bump & verify pinning strategy for typescript-eslint
vitest is now at ^3.1.3; please ensure the existing test suite remains passing. The typescript-eslint dependency remains pinned to 8.32.1. Confirm whether to adopt a caret for this entry.

packages/signers/ethereum/package.json (3)

35-38: Approve bump of TypeScript and ESLint devDependencies
Updating @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, and eslint remains aligned with the monorepo standards and does not introduce breaking changes.


40-40: Approve update of Prettier integration
Bumping eslint-config-prettier to ^10.1.5 ensures formatting rules are applied correctly.


49-50: Vitest bump & verify pinning strategy for typescript-eslint
The vitest version is now ^3.1.3; ensure existing tests are compatible. The typescript-eslint dev dependency remains pinned to 8.32.1, without a caret—confirm whether this should be updated.

packages/keyring/package.json (3)

37-40: Approve bump of TypeScript and ESLint devDependencies
The upgrade of @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, and eslint across the keyring package aligns with the monorepo; no breaking behavior expected.


42-42: Approve update of Prettier integration
Updating eslint-config-prettier to ^10.1.5 helps keep formatting rules consistent.


51-52: Vitest bump & verify pinning strategy for typescript-eslint
vitest has been bumped to ^3.1.3; please verify all test cases still pass. The typescript-eslint dependency remains pinned exactly to 8.32.1 (no caret); confirm if this is deliberate.

package.json (2)

35-37: Patch bump for Commitlint & SWC devDependencies
Versions for @commitlint/cli, @commitlint/config-conventional, and @swc/core have been updated to patch releases, matching the coordinated monorepo tooling updates.


41-41: Patch bump for nodemon devDependency
The nodemon version has been bumped to a newer patch release. This is a minor, non-breaking update.

packages/name-resolution/package.json (3)

25-28: DevDependency version bumps: ESLint & TypeScript tooling
Updated @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, and eslint to patch/minor releases—consistent with the monorepo’s dev tooling alignment.


30-30: DevDependency patch bump: eslint-config-prettier
The eslint-config-prettier package has been updated to a newer minor release. Safe, non-breaking change.


39-40: DevDependency bumps: TypeScript ESLint & Vitest
The typescript-eslint and vitest versions have been updated to newer patch releases, keeping test/linting tools in sync.

packages/request/package.json (4)

31-31: Runtime dependency upgrade: ws
The ws package has been bumped to a patch release (^8.18.2). Verify that underlying WebSocket behavior remains unaffected.


34-37: DevDependency version bumps: ESLint & TypeScript tooling
Updated @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, and eslint to the latest patch/minor releases—consistent monorepo alignment.


39-39: DevDependency patch bump: eslint-config-prettier
Bumped eslint-config-prettier to a newer minor release; non-breaking for lint configurations.


48-49: DevDependency bumps: TypeScript ESLint & Vitest
The typescript-eslint and vitest packages have been updated to patch releases, ensuring test suite consistency.

packages/utils/package.json (3)

33-36: DevDependency version bumps: ESLint & TypeScript tooling
Updated @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, and eslint to the latest patch/minor releases to maintain consistency.


38-38: DevDependency patch bump: eslint-config-prettier
The eslint-config-prettier package has been upgraded to a newer minor release; safe update.


48-49: DevDependency bumps: TypeScript ESLint & Vitest
Bumped typescript-eslint and vitest to patch releases, aligning with other packages’ test and lint config.

packages/storage/package.json (3)

30-33: DevDependency version bumps: ESLint & TypeScript tooling
Updated @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, and eslint to patch/minor releases consistent with the monorepo.


35-35: DevDependency patch bump: eslint-config-prettier
eslint-config-prettier has been upgraded to a newer minor version; non-breaking update.


44-45: DevDependency bumps: TypeScript ESLint & Vitest
The typescript-eslint and vitest packages have been updated to patch releases, keeping dev tooling in sync.

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

25-41: DevDependencies version bumps approved.
All development dependencies have been updated to newer patch/minor versions. Please ensure linting and tests pass with these changes.


56-66: Runtime dependencies version bumps approved.
The runtime dependencies (@ledgerhq/hw-app-eth, @polkadot/types, @zondax/ledger-substrate) have been updated. Verify there are no breaking changes by running integration or smoke tests.

packages/swap/package.json (2)

28-39: Runtime dependencies version bumps approved.
The dependencies (@solana/web3.js, bignumber.js, rango-sdk-basic, ws) have been updated. Please run integration tests to verify compatibility across modules.


42-45: DevDependencies version bumps approved.
All development tooling packages have been upgraded. Ensure linting, type-checking, and tests succeed after these updates.

Also applies to: 47-47, 56-57

packages/extension/package.json (2)

26-26: Dependency version bumps approved.
Multiple runtime dependencies have been updated (e.g., @amplitude/analytics-browser, Polkadot packages, @solana/web3.js, bignumber.js, vue-router). Verify functionality with the extension to ensure no regressions.

Also applies to: 43-43, 46-47, 49-51, 58-58, 61-61, 83-83


102-102: DevDependencies version bumps approved.
All development tooling packages have been upgraded. Run linting, type-checking (vue-tsc), and unit tests (vitest) to confirm no issues.

Also applies to: 108-108, 114-114, 120-121, 125-126, 129-129, 131-131, 136-136, 139-140

packages/extension-bridge/package.json (1)

47-47: DevDependencies version bumps approved.
The development dependencies related to TypeScript linting and formatting have been updated. Ensure that the formatting and linting pipelines remain green.

Also applies to: 49-50, 52-52, 54-54, 62-62

packages/signers/polkadot/package.json (2)

25-25: Dependency version bump approved.
The @commitlint/cli dependency has been bumped. Confirm that commit message linting behavior remains correct.


34-37: DevDependencies version bumps approved.
All devDependencies (TypeScript, ESLint, Vitest, etc.) have been updated. Run linting and tests to verify there are no regressions.

Also applies to: 39-39, 48-49

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: 0

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

280-285: Consider refactoring the reducer with spread operator for better performance.

The indentation improvements look good. However, the static analysis tool correctly identifies a potential performance issue.

  const marketInfo = supportedNetworks[networkName].cgPlatform
    ? await marketData.getMarketInfoByContracts(
        Object.keys(balances).filter(
          contract => contract !== NATIVE_TOKEN_ADDRESS,
        ),
        supportedNetworks[networkName].cgPlatform as CoingeckoPlatform,
      )
-   : tokens.reduce(
-       (obj, cur) => ({ ...obj, [cur.contract]: null }),
-       {} as Record<string, CoinGeckoTokenMarket | null>,
-     );
+   : tokens.reduce(
+       (obj, cur) => {
+         obj[cur.contract] = null;
+         return obj;
+       },
+       {} as Record<string, CoinGeckoTokenMarket | null>,
+     );

Using the spread operator in reducers can lead to O(n²) time complexity as it creates a new object in each iteration. The suggested approach directly modifies the accumulator object, which is more efficient.

packages/extension/src/libs/nft-handlers/conflux.ts (3)

36-37: Consider eliminating the double type cast for cleaner type handling.

The double type cast (as unknown as NFTBalanceItem[]) suggests a potential type mismatch between the API response and your defined types.

- for (let collection of nftBalances.result
-   .list as unknown as NFTBalanceItem[]) {
+ for (let collection of nftBalances.result.list as NFTBalanceItem[]) {

If a direct cast isn't possible due to type incompatibility, consider updating the interface definitions to more closely match the API response structure.


72-73: Consider eliminating the double type cast for cleaner type handling.

Similar to the earlier comment, the double type cast here could be simplified if the interfaces are aligned with the API response structure.

- let items: ConfluxNFTItem[] = itemResponse.result
-   .list as unknown as ConfluxNFTItem[];
+ let items: ConfluxNFTItem[] = itemResponse.result.list as ConfluxNFTItem[];

13-15: Consider implementing rate limiting protection for the API.

The handler makes multiple API requests to the ConfluxScan API, which might have rate limits.

Consider implementing a simple rate limiting mechanism or checking if the API returns rate limiting headers that should be respected to avoid potential issues in production.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 74c6324 and e0ea928.

⛔ Files ignored due to path filters (1)
  • packages/extension/src/providers/ethereum/networks/icons/conflux.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • packages/extension/src/libs/nft-handlers/conflux.ts (1 hunks)
  • packages/extension/src/libs/nft-handlers/types/conflux.ts (1 hunks)
  • packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts (1 hunks)
  • packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts (2 hunks)
  • packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/conflux.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/index.ts (2 hunks)
  • packages/types/src/networks.ts (2 hunks)
✅ Files skipped from review due to trivial changes (5)
  • packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts
  • packages/extension/src/providers/ethereum/networks/index.ts
  • packages/types/src/networks.ts
  • packages/extension/src/providers/ethereum/networks/conflux.ts
  • packages/extension/src/libs/nft-handlers/types/conflux.ts
🧰 Additional context used
🧬 Code Graph Analysis (2)
packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts (2)
packages/swap/src/configs.ts (1)
  • NATIVE_TOKEN_ADDRESS (123-123)
packages/extension/src/libs/market-data/types.ts (1)
  • CoinGeckoTokenMarket (23-37)
packages/extension/src/libs/nft-handlers/conflux.ts (3)
packages/extension/src/types/provider.ts (1)
  • NodeType (189-208)
packages/extension/src/types/nft.ts (1)
  • NFTCollection (17-23)
packages/extension/src/libs/nft-handlers/types/conflux.ts (4)
  • ConfluxResponse (31-35)
  • NFTBalanceItem (15-24)
  • NFTItemWithDesc (37-39)
  • ConfluxNFTItem (3-13)
🪛 Biome (1.9.4)
packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts

[error] 287-287: 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)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: buildAll
  • GitHub Check: test
  • GitHub Check: test
🔇 Additional comments (3)
packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts (1)

76-77: LGTM: Appropriate extension of supported networks.

The addition of NetworkNames.Conflux to the SupportedNetworkNames type properly extends the union type to include support for the Conflux network.

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

219-223: LGTM: Well-structured addition of Conflux network support.

The Conflux network entry follows the established pattern with appropriate values for the token balance name (tbName) and Coingecko platform identifier.

packages/extension/src/libs/nft-handlers/conflux.ts (1)

1-56: LGTM: Well-implemented NFT handler for the Conflux network.

The implementation follows the standard pattern for NFT handlers, correctly:

  • Verifies the network is Conflux
  • Uses cached API requests to fetch collections and items
  • Handles error cases appropriately
  • Converts data to the standard NFTCollection format

The code organization and flow are clear and maintainable.

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: 0

🧹 Nitpick comments (1)
packages/extension/src/ui/action/components/app-dialog/index.vue (1)

85-90: Approve UI refinement, but consider cross-browser compatibility

The addition of scrollbar-width: none improves the visual cleanliness of the dialog component by hiding the scrollbar. This aligns with the UI refinement goals mentioned in the summary.

For better cross-browser support, consider also adding the WebKit equivalent:

const dialogStyle = computed(() => {
  return {
    width: props.width,
    'scrollbar-width': 'none',
+   '-webkit-scrollbar': { display: 'none' }, // For WebKit browsers (Chrome, Safari)
  };
});

Note that hidden scrollbars may impact discoverability of scrollable content for some users. Consider whether additional visual cues might be needed to indicate scrollability.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0f93616 and a973477.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • packages/extension/package.json (5 hunks)
  • packages/extension/src/ui/action/App.vue (4 hunks)
  • packages/extension/src/ui/action/components/app-dialog/index.vue (1 hunks)
  • packages/extension/src/ui/action/store/rate-store.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/extension/src/ui/action/store/rate-store.ts
  • packages/extension/package.json
  • packages/extension/src/ui/action/App.vue
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: buildAll
  • GitHub Check: test

@kvhnuke kvhnuke changed the title devop: update packages Release: v2.7.0 May 16, 2025
@kvhnuke kvhnuke merged commit 97bd787 into develop May 16, 2025
5 checks passed
@kvhnuke kvhnuke deleted the devop/packeupdates-0512 branch May 16, 2025 21:25
@coderabbitai coderabbitai bot mentioned this pull request Sep 16, 2025
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.

9 participants