Skip to content

OPDATA-6579: Add getEnvVarName to variable env vars#845

Merged
dskloetc merged 1 commit into
mainfrom
kloet/env-var-name
Jul 9, 2026
Merged

OPDATA-6579: Add getEnvVarName to variable env vars#845
dskloetc merged 1 commit into
mainfrom
kloet/env-var-name

Conversation

@dskloetc

@dskloetc dskloetc commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

https://smartcontract-it.atlassian.net/browse/OPDATA-6579

Description

The framework has support for variable environment variables, such as ${NETWORK}_RPC_URL where ${NETWORK} can be determined at runtime.

Sometimes we do additional checks on the value of the variable in the EA and we want to give an error message. But in order to mention the correct env var name in the error message, we have to reconstruct it in the EA. For example in generic-api or in view-function-multi-chain.

To make this more convenient, we should provide a way to get the variable name from the framework.

Change

Add getEnvVarName() which returns the name of an environment variable for a given config variable and placeholder variable.

Testing

  1. Unit test added.
  2. Tested locally with nav-generic in external-adapters-js.

@dskloetc dskloetc changed the title Add getEnvVarName to variable env vars OPDATA-6579: Add getEnvVarName to variable env vars Jul 9, 2026
@dskloetc dskloetc marked this pull request as ready for review July 9, 2026 08:41
@dskloetc dskloetc requested a review from a team as a code owner July 9, 2026 08:41
@dskloetc dskloetc added the minor label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

NPM Publishing labels 🏷️

🟢 This PR has valid version labels and will cause a minor bump.

@dskloetc dskloetc merged commit 74b7843 into main Jul 9, 2026
18 of 19 checks passed
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Successfully created version bump PR: #846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants