Skip to content
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

devop: update zerox api #615

Merged
merged 7 commits into from
Feb 18, 2025
Merged

Conversation

gamalielhere
Copy link
Contributor

@gamalielhere gamalielhere commented Feb 10, 2025

Summary by CodeRabbit

  • Chores

    • Upgraded multiple project dependencies, development tools, and build settings for improved stability and compatibility.
    • Adjusted integration endpoints in the swap functionality to ensure smoother connectivity.
  • Refactor

    • Streamlined wallet import and address retrieval processes to enhance clarity and maintainability.
  • Style

    • Applied minor formatting improvements for a more consistent codebase.

Copy link

coderabbitai bot commented Feb 10, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (3)
  • main
  • develop
  • devop/vite-migrate

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Changes span multiple packages, updating dependency and devDependency versions across numerous package.json files. Notable updates include version bumps for tools like commitlint, swc, eslint, typescript, and many others. Minor syntax improvements, such as added semicolons, enhance code consistency in TypeScript and Vue files. In wallet-related modules, the Wallet import is revised to a named import while the method for retrieving wallet addresses is switched to a dedicated function. Configuration files have been updated with expanded file inclusions, new alias mappings, revised legacy and polyfill settings, and external dependency definitions. Additionally, the ZeroX API endpoint URL has been updated.

Changes

File(s) Change Summary
package.json (root) and all packages/{extension-bridge, extension, hw-wallets, keyring, name-resolution, request, signers/{bitcoin,ethereum,kadena,polkadot}, storage, swap, types, utils}/package.json Updated dependency and devDependency versions (e.g., commitlint, swc, eslint, prettier, typescript, uuid), with some dependencies added or removed.
packages/extension/configs/…/transform-manifest.ts, packages/extension/src/ui/action/main.ts Added semicolons to statements and return lines for syntax consistency.
packages/extension/src/ui/action/views/import-account/…/*.vue Revised Wallet imports from default to named import from @ethereumjs/wallet and updated wallet address generation from manual hex conversion to using getAddressString().
packages/extension/tsconfig.node.json, packages/extension/vite.config.ts Expanded file inclusion and added path aliases in tsconfig; updated legacy settings, polyfill inclusions (e.g., added 'os'), removal of Less relativeUrls, and defined external modules (fs) in Vite config.
packages/swap/src/providers/zerox/index.ts Changed the API base URL from /zerox/ to /zeroxv2/ and adjusted the endpoint path and query parameter structure.

Suggested reviewers

  • kvhnuke
  • NickKelly1

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @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.

Copy link

github-actions bot commented Feb 10, 2025

💼 Build Files
chrome: enkrypt-chrome-7646821d.zip
firefox: enkrypt-firefox-7646821d.zip

💉 Virus total analysis
chrome: 7646821d
firefox: 7646821d

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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7bee132 and eb98290.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (22)
  • package.json (1 hunks)
  • packages/extension-bridge/package.json (1 hunks)
  • packages/extension/configs/vite/transform-manifest.ts (3 hunks)
  • packages/extension/package.json (3 hunks)
  • packages/extension/src/ui/action/main.ts (1 hunks)
  • packages/extension/src/ui/action/views/import-account/views/import-account-password.vue (2 hunks)
  • packages/extension/src/ui/action/views/import-account/views/import-account-private-key.vue (2 hunks)
  • packages/extension/tsconfig.node.json (1 hunks)
  • packages/extension/vite.config.ts (3 hunks)
  • packages/hw-wallets/package.json (2 hunks)
  • packages/keyring/package.json (1 hunks)
  • packages/name-resolution/package.json (2 hunks)
  • packages/request/package.json (1 hunks)
  • packages/signers/bitcoin/package.json (1 hunks)
  • packages/signers/ethereum/package.json (1 hunks)
  • packages/signers/kadena/package.json (1 hunks)
  • packages/signers/polkadot/package.json (1 hunks)
  • packages/storage/package.json (1 hunks)
  • packages/swap/package.json (1 hunks)
  • packages/swap/src/providers/zerox/index.ts (2 hunks)
  • packages/types/package.json (1 hunks)
  • packages/utils/package.json (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • packages/extension/src/ui/action/main.ts
  • packages/swap/src/providers/zerox/index.ts
  • packages/extension/configs/vite/transform-manifest.ts
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: buildAll
  • GitHub Check: test
🔇 Additional comments (32)
packages/extension/vite.config.ts (2)

73-73: LGTM: OS module polyfill added.

Adding 'os' to the nodePolyfills include list is appropriate for browser compatibility.


104-104: LGTM: Externalized fs module.

Marking 'fs' as external is correct as it's a Node.js module that shouldn't be bundled for browser use.

packages/extension/src/ui/action/views/import-account/views/import-account-password.vue (2)

40-40: LGTM: Updated to @ethereumjs/wallet package.

The import statement has been correctly updated to use the new package name and named imports.


116-116: LGTM: Simplified address retrieval.

Using getAddressString() is a cleaner approach than the previous method.

packages/extension/src/ui/action/views/import-account/views/import-account-private-key.vue (2)

39-39: LGTM: Consistent package update.

The import statement has been updated consistently with other files.


96-96: LGTM: Consistent method usage.

The address retrieval method has been updated to match the changes in other files.

packages/extension/tsconfig.node.json (2)

14-16: LGTM: Enhanced TypeScript coverage.

Added patterns ensure proper TypeScript checking for source and config files.


25-28: LGTM: Path aliases match usage.

The path aliases correctly match the import patterns used in the Vue components.

packages/types/package.json (1)

27-41: Dependency Version Updates in DevDependencies
The updated versions for @types/node, eslint, prettier, tsup, typescript, and typescript-eslint are applied correctly. They align with the project-wide bumps seen in related packages. Please ensure that these new versions have been thoroughly tested in your CI to avoid any compatibility hiccups.

packages/storage/package.json (1)

30-45: Consistent DevDependency Bumps
The devDependencies section now updates @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest to their newer versions. These changes are consistent with the updates in other packages. No issues spotted; just confirm integration tests cover any edge cases that could be affected by these version bumps.

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

25-40: Harmonized DevDependencies Version Updates
The version updates for packages such as @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest ensure consistency with the overall repository. Additionally, the bump in @unstoppabledomains/resolution to ^9.3.3 should be verified against any related integration points for domain resolution.

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

31-48: Updated DevDependencies Including External Crypto Library
The updated versions for @polkadot/util-crypto, @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest in the devDependencies are correctly applied. Make sure the bump in @polkadot/util-crypto to ^13.3.1 is fully compatible with the existing Kadena signing logic.

packages/utils/package.json (2)

27-27: Dependency Update for @polkadot/util-crypto
The bump of @polkadot/util-crypto to ^13.3.1 in the dependencies section is in line with recent updates across the repo. Ensure that any usage of this package in your utility functions is compatible with the changes in the new version.


33-48: DevDependencies Version Standardization
The versions for @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest in the devDependencies have been updated to maintain consistency across all packages. This streamlined update should reduce conflicts and improve maintainability.

packages/request/package.json (2)

30-30: Dependency Version Update: "uuid"
The dependency "uuid" has been updated to "^11.0.5", which aligns with the version bumps in other packages. This ensures consistency across the repository.


34-49: DevDependencies Version Bumps
The updates for devDependencies (including @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest) are consistent with the overall maintenance effort across the project. Please ensure your build and test pipelines validate these updates.

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

35-50: Consistent DevDependencies Upgrades
The devDependencies updates—updating @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest—are in line with project-wide upgrades. This should help maintain compatibility and alignment across packages.

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

35-50: DevDependencies Update Verification
The updated versions for @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest in the Ethereum signer package are consistent with the other packages' updates. No issues detected.

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

25-28: Dependencies Update: Commitlint and Polkadot Utilities
The dependency updates—upgrading @commitlint/cli to "^19.7.1", and bumping @polkadot/util and @polkadot/util-crypto to "^13.3.1"—ensure you are leveraging the latest releases for improved stability and compatibility.


34-49: DevDependencies Upgrade Consistency
DevDependencies in this file have been updated (@types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest), which keeps the development tools in sync across packages. It is advised to verify that the build and test processes pass after these changes.

packages/keyring/package.json (2)

32-32: Dependency Update: "@polkadot/util"
The update of @polkadot/util to "^13.3.1" in the dependencies section is a welcome change that ensures compatibility with the latest improvements offered by the package.


37-52: DevDependencies Version Alignment
The devDependencies—updating @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest—reflect a consistent upgrade strategy across the repository. Please confirm that these updates do not disrupt existing workflows.

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

42-42: Dependency Version Update for "serialize-error".
The dependency has been bumped from a previous version to "12.0.0", which should bring improvements and fixes. Please verify that there are no breaking changes introduced by this upgrade.


47-64: DevDependency Upgrades.
Multiple devDependencies (such as @types/node, bumpp, eslint, prettier, tsup, type-fest, typescript, and typescript-eslint) have been updated. These updates help maintain consistency across the project’s packages. Ensure that your TypeScript configuration and linting rules work as expected with these new versions.

packages/swap/package.json (2)

27-29: Dependency Updates in Swap Package.
The versions for @solana/spl-token, @solana/web3.js, rango-sdk-basic, and uuid have been updated. These changes align with broader ecosystem upgrades. Please test that the swap functionalities—which rely on these libraries—continue to behave correctly.


42-57: DevDependency Version Bumps in Swap Package.
The devDependencies now use updated versions for packages like @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest. This helps maintain a consistent development environment across packages. Verify that your build, lint, and test scripts remain fully functional.

package.json (1)

35-41: Root DevDependencies Upgrade.
The versions for development tools (@commitlint/cli, @commitlint/config-conventional, @swc/core, concurrently, husky, and nodemon) have been bumped. These updates enhance the development experience and ensure consistency in pre-commit and build hooks. Double-check for any potential integration issues with these new versions.

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

25-40: hw-wallets DevDependencies Updates.
The devDependencies (including @types/node, eslint, prettier, tsup, typescript, typescript-eslint, and vitest) have been updated to newer versions. This is in line with the changes in other packages and should help standardize the development workflow. Please ensure that your build and test processes complete without issues.


55-66: hw-wallets Dependencies Bump.
Several wallet-related dependencies such as @ledgerhq/hw-app-btc, @ledgerhq/hw-app-eth, @ledgerhq/live-common, @polkadot/types, @polkadot/util, @trezor/connect, @trezor/connect-webextension, @zondax/ledger-substrate, and bitcoinjs-lib have been updated. Confirm that these changes are compatible with the underlying hardware wallet workflows and that integration tests pass successfully.

packages/extension/package.json (3)

26-40: Extension Package: Dependency Enhancements.
This section updates key dependencies including an upgrade of @amplitude/analytics-browser, introduces a new dependency (@ethereumjs/wallet at version ^2.0.4), and bumps the versions for @kadena/client and @kadena/pactjs-cli to ^1.16.0. These changes should improve feature support and align with the overall project upgrade strategy. Please verify that the wallet and blockchain integrations work as intended.


26-89: Broad Dependency Updates.
A significant block of dependencies—including blockchain SDKs, wallet libraries, and UI utilities—has been updated (e.g., for various @polkadot, @solana, and related packages). This reflects a coordinated effort to use more recent library versions. It is important to perform thorough integration testing to ensure that these updates do not disrupt existing functionalities.


90-141: Updated DevDependencies for Enhanced Build and Tooling.
In the devDependencies section, several build tools, TypeScript plugins, and linting utilities (such as updates to @crxjs/vite-plugin, various Rollup plugins, eslint, prettier, and vite among others) have been upgraded. This should result in an improved development experience. Please run your build and test pipelines to confirm that all tools integrate seamlessly with these updates.

@kvhnuke kvhnuke changed the base branch from develop to devop/upgrade-packages February 10, 2025 20:14
@gamalielhere gamalielhere changed the base branch from devop/upgrade-packages to devop/release-2.2.2 February 18, 2025 19:04
@gamalielhere gamalielhere merged commit 6f90019 into devop/release-2.2.2 Feb 18, 2025
4 checks passed
@gamalielhere gamalielhere deleted the devop/update-zerox-api branch February 18, 2025 19:23
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.

6 participants