Skip to content

Conversation

@serejke
Copy link
Contributor

@serejke serejke commented Nov 26, 2025

The env var was never being read because the --rpc-url CLI arg had a default_value, making the Option always Some. Changed to use clap's built-in env attribute which properly handles the env var fallback.

Also sanitized the displayed datasource URL to show only scheme and host (e.g., "https://example.com") to prevent leaking API keys in the UI.

…in UI

The env var was never being read because the --rpc-url CLI arg had a
default_value, making the Option always Some. Changed to use clap's
built-in `env` attribute which properly handles the env var fallback.

Also sanitized the displayed datasource URL to show only scheme and host
(e.g., "https://example.com") to prevent leaking API keys in the UI.

(cherry picked from commit 0144ae2)

# Conflicts:
#	crates/cli/src/cli/mod.rs
#	crates/types/src/types.rs
Copy link
Member

@lgalabru lgalabru left a comment

Choose a reason for hiding this comment

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

Excellent work, thank you @serejke!

@lgalabru
Copy link
Member

Can you please run cargo +nightly fmt --all ?

Copy link
Member

@MicaiahReid MicaiahReid left a comment

Choose a reason for hiding this comment

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

Sick, thanks @serejke!

@lgalabru lgalabru merged commit eb6f312 into txtx:main Nov 26, 2025
3 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.

3 participants