-
Notifications
You must be signed in to change notification settings - Fork 86
[Refactor] Create shared directory for all network environments #864
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
base: naga
Are you sure you want to change the base?
[Refactor] Create shared directory for all network environments #864
Conversation
…natures script to be inside a shared directory
…e `test:e2e` script
…ic-with-an-option-to-override
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.
Pull Request Overview
This PR implements a refactoring to create a shared directory structure for all network environments to eliminate code duplication and follow the DRY principle. The main change is removing environment-specific duplicate code from naga-staging and consolidating shared logic into a common directory structure.
Key changes:
- Removal of duplicate API manager implementations from naga-staging environment
- Deletion of environment-specific helper functions and utilities that are now shared
- Cleanup of redundant state management, session management, and testing code
Reviewed Changes
Copilot reviewed 92 out of 335 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/networks/src/networks/vNaga/envs/naga-staging/api-manager/helper/get-signatures.ts | Removed duplicate signature combination logic for executeJS and PKP sign operations |
packages/networks/src/networks/vNaga/envs/naga-staging/api-manager/executeJs/*.ts | Removed duplicate executeJs API implementation including schemas and handlers |
packages/networks/src/networks/vNaga/envs/naga-staging/api-manager/decrypt/*.ts | Removed duplicate decrypt API schemas and request/response handlers |
packages/networks/src/networks/vNaga/envs/naga-staging/api-manager/e2ee-request-manager/E2EERequestManager.ts | Removed duplicate end-to-end encryption request management logic |
packages/networks/src/networks/vNaga/envs/naga-local/state-manager/*.ts | Removed duplicate state management implementation and related test files |
packages/networks/src/networks/vNaga/envs/naga-local/session-manager/*.ts | Removed duplicate session management logic including validation and formatting utilities |
packages/networks/src/networks/vNaga/envs/naga-prod/*.ts | Removed placeholder/commented production environment files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…dding new configuration options
…atch updates for all Lit Protocol packages
…following networks unification
…ic-with-an-option-to-override
…option-to-override' of github.com:LIT-Protocol/js-sdk into feature/jss-37-optimisation-unify-shared-logic-with-an-option-to-override
…ckward compatibility methods
WHAT
Currently, if we want to update the logic for different network environments (e.g., naga-dev and naga-staging), we have to modify two separate places with essentially the same code. This goes against the DRY principle.
This PR fixed this by creating a
shared
directory for all shared network APIs and utilities.Please see the tree below to get the general sense how this is structured.
Here's the directory
Changes
--timeout 50000000
to the to the E2E tests.Prereleases
Tree