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

feat: Add block_explorer field to ShowConfigResponse #2750

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mexes20
Copy link

@mexes20 mexes20 commented Dec 4, 2024

Closes #2711

Introduced changes

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Performed self-review of the code
  • Added changes to CHANGELOG.md

Copy link
Contributor

@ddoktorski ddoktorski left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @mexes20
Please extend the existing show-config tests to cover both default and non-default block-explorer cases.

@cptartur cptartur removed their request for review December 5, 2024 09:41
@mexes20 mexes20 requested a review from ddoktorski December 7, 2024 12:57
Copy link
Contributor

@ddoktorski ddoktorski left a comment

Choose a reason for hiding this comment

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

Could you also include logic to not display url when show_explorer_links is set to false?

crates/sncast/src/helpers/configuration.rs Show resolved Hide resolved
crates/sncast/tests/e2e/show_config.rs Show resolved Hide resolved
crates/sncast/tests/e2e/show_config.rs Show resolved Hide resolved
@@ -128,3 +128,40 @@ async fn test_show_config_no_url() {
wait_timeout: 500
"});
}

#[tokio::test]
async fn test_show_config_default_block_explorer() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This check can be added in the test_show_config_from_snfoundry_toml instead of creating a separate test

chain_id: alpha-sepolia
profile: profile5
rpc_url: {}
block_explorer: blockscout
Copy link
Contributor

Choose a reason for hiding this comment

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

This blok explorer is not supported, please add the custom check for Voyager

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.

Add block_explorer field to ShowConfigResponse
2 participants