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

Fixed wrong TX url in email notifications for mainnet #7951

Merged

Conversation

atapin
Copy link
Contributor

@atapin atapin commented Jul 17, 2023

Fixes #7938

Motivation

Currently, email notifications on mainnet contain wrong tx address, e.g.:
https://blockscout.com/tx/0x8ae7becf6abe11ff4eec490537f26e9cac228af37dbc3503e9bc030162e42b79 instead of https://eth.blockscout.com/tx/0x8ae7becf6abe11ff4eec490537f26e9cac228af37dbc3503e9bc030162e42b79

Bug Fixes

The url-building logic contained redundant check for prod environment that led to wrong hostname substitution. According to the docs, the environment should have correct value in BLOCKSCOUT_HOST ENV variable.

Checklist for your Pull Request (PR)

  • I added an entry to CHANGELOG.md with this PR
  • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.

@atapin
Copy link
Contributor Author

atapin commented Jul 17, 2023

To maintainers: advices on how to add a regression on module-private API are appreciated. There's already good test for Explorer.Account.Notify.Email, but it was not ready for dependency on environment-specific logic.

@vbaranov
Copy link
Member

Nice catch, thank you! I will improve tests for this module in frame of #7954

@vbaranov vbaranov self-requested a review July 17, 2023 18:02
@vbaranov vbaranov merged commit 494b89f into blockscout:master Jul 17, 2023
15 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.

Wrong URL in notification on mainnet
2 participants