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

{cmd/dcrdata/views}: Fix orphan block api link on the block view #1992

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

ukane-philemon
Copy link
Collaborator

Closes #1745

Issue: Visit the https://dcrdata.decred.org/side and click on any block, then click on the api link on the displayed block view. It'll display data for the mainchain block.

Signed-off-by: Philemon Ukane <ukanephilemon@gmail.com>
Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

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

Thanks for this

<a class="fs13" href="/api/block/{{.Height}}/verbose?indent=true" data-turbolinks="false">api</a>
{{- else}}
<a class="fs13" href="/api/block/hash/{{.Hash}}/verbose?indent=true" data-turbolinks="false">api</a>
Copy link
Member

Choose a reason for hiding this comment

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

How about hash in both cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The user would proly look at the URL to note the block they are viewing, I think we'd want to make this exception just for side blocks unless you want us to use hash for both.

@chappjc chappjc merged commit 1f13820 into decred:master Jun 6, 2024
5 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 api link for orphan blocks.
2 participants