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

[BBND-291] Remove environment variables that are unnecessarily required #648

Open
pathornteng opened this issue May 17, 2023 · 2 comments
Open
Labels
Improvement Code changes driven by non business requirements

Comments

@pathornteng
Copy link
Collaborator

pathornteng commented May 17, 2023

The public key can be derived from the private key. We do not have to require the user to enter the public key in .env file.

The following environment variables in .env can be removed

TESTNET_HEDERA_OPERATOR_PUBLICKEY
TESTNET_HEDERA_NON_OPERATOR_PUBLICKEY
PREVIEWNET_HEDERA_OPERATOR_PUBLICKEY
PREVIEWNET_HEDERA_NON_OPERATOR_PUBLICKEY

To derive the public key from the private key just use the code below

privateKey.publicKey

In addition, the key type should not be required as the SDK should be able to distinguish the private key by itself. The following environment variables should also be removed

TESTNET_HEDERA_OPERATOR_ED25519
TESTNET_HEDERA_NON_OPERATOR_ED25519
PREVIEWNET_HEDERA_OPERATOR_ED25519
PREVIEWNET_HEDERA_NON_OPERATOR_ED25519
@MiguelLZPF MiguelLZPF added the Improvement Code changes driven by non business requirements label Sep 18, 2024
@MiguelLZPF
Copy link
Contributor

Hey @pathornteng! Sorry for the late response 🙏🏽, we lost this issue in the backlog.
As the ENV variables are only used for testing, it is not urgent to address the issue. Anyway, we have marked it as "improvement" and will look into it when we have spare time in following sprints.

@MiguelLZPF
Copy link
Contributor

BBND-291

@MiguelLZPF MiguelLZPF changed the title Remove environment variables that are unnecessarily required [BBND-291] Remove environment variables that are unnecessarily required Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Code changes driven by non business requirements
Projects
None yet
Development

No branches or pull requests

2 participants