Skip to content

fix: removed env config file and updated its dependencies#1249

Merged
pranalidhanavade merged 3 commits intomainfrom
fix/remove-env-config-and-its-dependencies
Sep 30, 2025
Merged

fix: removed env config file and updated its dependencies#1249
pranalidhanavade merged 3 commits intomainfrom
fix/remove-env-config-and-its-dependencies

Conversation

@pranalidhanavade
Copy link
Copy Markdown
Contributor

@pranalidhanavade pranalidhanavade commented Sep 30, 2025

What

  • fix: removed env config file and updated its dependencies

Important

Remove envConfig.ts and update all environment variable references to use process.env directly across multiple files.

  • Environment Configuration:
    • Remove envConfig.ts and update all references to use process.env directly in user-nav.tsx, pathRoutes.ts, and SessionManager.tsx.
    • Update .env.demo to remove NEXT_PUBLIC_CRYPTO_PRIVATE_KEY and add CRYPTO_PRIVATE_KEY.
  • Code Updates:
    • Replace envConfig.NEXT_PUBLIC_BASE_URL with process.env.NEXT_PUBLIC_BASE_URL in user-nav.tsx, SessionManager.tsx, and axiosIntercepter.ts.
    • Replace envConfig.PLATFORM_DATA.enableBillingOption with process.env.NEXT_PUBLIC_ENABLE_BILLING_OPTION in user-nav.tsx.
    • Replace envConfig.PLATFORM_DATA.docs with process.env.PUBLIC_PLATFORM_DOCS_URL in pathRoutes.ts.
    • Replace envConfig.NEXT_PUBLIC_ECOSYSTEM_FRONT_END_URL with process.env.NEXT_PUBLIC_ECOSYSTEM_FRONT_END_URL in dashboard.tsx.
    • Replace envConfig.NEXT_PUBLIC_CRYPTO_PRIVATE_KEY with process.env.CRYPTO_PRIVATE_KEY in SchemaListUtils.ts.
    • Replace envConfig.MODE with process.env.NEXT_PUBLIC_MODE in DedicatedAgentLedgerConfig.tsx and LedgerConfig.tsx.
    • Replace envConfig.PLATFORM_DATA.polygonTestnet and envConfig.PLATFORM_DATA.polygonMainnet with process.env.NEXT_PUBLIC_POLYGON_TESTNET_URL and process.env.NEXT_PUBLIC_POLYGON_MAINNET_URL in DidListComponent.tsx and SetPrivateKeyValue.tsx.

This description was created by Ellipsis for db34f57. You can customize this summary. It will automatically update as commits are pushed.

Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 252718a in 1 minute and 11 seconds. Click for details.
  • Reviewed 367 lines of code in 13 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/components/layout/user-nav.tsx:157
  • Draft comment:
    Remove the trailing space in the '/billing ' route to prevent unexpected routing behavior.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. src/services/axiosIntercepter.ts:150
  • Draft comment:
    Instead of immediately logging out when the token is expired, consider implementing a token refresh flow to improve user experience.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. src/utils/authOptions.ts:115
  • Draft comment:
    Ensure consistent URL concatenation in the authorize function. Verify that the base URL and API route strings are concatenated correctly (e.g., handling trailing slashes) for both password and passkey flows.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the author to verify the URL concatenation logic, which is not allowed as per the rules. It doesn't provide a specific suggestion or point out a clear issue, but rather asks for verification.
4. src/components/layout/user-nav.tsx:157
  • Draft comment:
    Typo: The route string in router.push has an accidental trailing space ('/billing '), which could lead to unexpected behavior. It should be updated to '/billing'.
  • Reason this comment was not posted:
    Comment was on unchanged code.
5. src/utils/authOptions.ts:115
  • Draft comment:
    Typographical error: The string 'sinIn' appears to be a typo. Should it be 'signIn'?
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_srpdzpvvvbSA5lk8

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed bc31697 in 1 minute and 30 seconds. Click for details.
  • Reviewed 100 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 8 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .env.demo:4
  • Draft comment:
    Ensure the crypto key remains secret: using CRYPTO_PRIVATE_KEY (without NEXT_PUBLIC) avoids client exposure. Confirm it's only accessed server-side.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. src/components/layout/user-nav.tsx:157
  • Draft comment:
    Remove the trailing whitespace in the URL ('/billing ') to avoid potential routing issues.
  • Reason this comment was not posted:
    Comment was on unchanged code.
3. src/features/components/user-auth-form.tsx:427
  • Draft comment:
    The use of optional chaining with toLocaleLowerCase() for NEXT_PUBLIC_ENABLE_SOCIAL_LOGIN adds robustness. Ensure the env value is provided in lowercase for consistent comparison.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is purely informative, explaining the use of optional chaining and suggesting ensuring the environment variable is in lowercase. It doesn't provide a specific code suggestion or ask for a test to be written. It also doesn't point out a potential issue or ask for confirmation of intent. Therefore, it violates the rules.
4. src/features/verification/components/SchemaListUtils.ts:90
  • Draft comment:
    Switching to process.env.CRYPTO_PRIVATE_KEY helps avoid exposing secrets publicly. Verify that this key is used only in server-side contexts.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 50% <= threshold 50% The comment suggests a best practice of using environment variables for sensitive data, which is a valid point. However, it also asks the author to verify the usage context, which is against the rules. The first part of the comment is useful, but the second part is not allowed.
5. src/features/wallet/DedicatedAgentLedgerConfig.tsx:247
  • Draft comment:
    Using optional chaining with toUpperCase() for NEXT_PUBLIC_MODE improves robustness. Ensure that the Environment enum values are uppercase to match this check.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. src/features/wallet/LedgerConfig.tsx:231
  • Draft comment:
    The environment mode check now uses optional chaining and toUpperCase(), ensuring consistency. Confirm that the Environment enum values are defined in uppercase.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
7. .env.demo:1
  • Draft comment:
    Typo: 'developement' should be corrected to 'development'.
  • Reason this comment was not posted:
    Comment was on unchanged code.
8. src/components/layout/user-nav.tsx:158
  • Draft comment:
    Typo: There is an extra trailing space in the billing route string ('/billing '). It should likely be '/billing'.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_b5HOGBXNEXEdClhM

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed db34f57 in 1 minute and 35 seconds. Click for details.
  • Reviewed 26 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/features/components/user-auth-form.tsx:427
  • Draft comment:
    Consistently use toLowerCase for env var checks. This change improves uniformity for boolean flag comparisons.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. src/components/layout/user-nav.tsx:158
  • Draft comment:
    Typographical error: The URL string '/billing ' contains a trailing space. Consider changing it to '/billing' to avoid potential routing issues.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_nzpxiryG0ZKxvGdq

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

</DropdownMenuItem>

{envConfig.PLATFORM_DATA.enableBillingOption && (
{process.env.NEXT_PUBLIC_ENABLE_BILLING_OPTION?.toLowerCase() ===
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using toLowerCase is preferred over toLocaleLowerCase for simple boolean comparisons. Consider trimming the value if whitespace is possible.

Suggested change
{process.env.NEXT_PUBLIC_ENABLE_BILLING_OPTION?.toLowerCase() ===
{process.env.NEXT_PUBLIC_ENABLE_BILLING_OPTION?.trim().toLowerCase() ===

@pranalidhanavade pranalidhanavade merged commit 9e85ff1 into main Sep 30, 2025
2 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.

2 participants