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

In TX details, display ETH hash (if available) #239

Merged
merged 1 commit into from
Mar 25, 2023

Conversation

csillag
Copy link
Contributor

@csillag csillag commented Mar 24, 2023

Fixes #169

@csillag csillag requested a review from lukaw3d March 24, 2023 17:54
@csillag
Copy link
Contributor Author

csillag commented Mar 24, 2023

Currently the ETH hash is displayed in the TX details.

Where else would it be useful, @lukaw3d ?

@cloudflare-pages
Copy link

cloudflare-pages bot commented Mar 24, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 86a614e
Status:⚡️  Build in progress...

View logs

@@ -145,6 +145,15 @@ export const TransactionDetailView: FC<{
<TransactionLink hash={transaction.hash} layer={transaction.layer} />
<CopyToClipboard value={transaction.hash} />
</dd>
{transaction.eth_hash && (
<>
<dt>{t('common.ethHash')}</dt>
Copy link
Member

Choose a reason for hiding this comment

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

  • If tx has eth hash, that should be the only one displayed (at least until advanced user settings).

  • Lists of tx should show it, and link by it.

  • It should be displayed and copied with "0x" prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. One difficulty: when loading events from the API ( via the /paratime/events ), we only get a single tx_hash, which is an Oasis hash not an ETH hash, so we need to use it for linking.

Copy link
Member

Choose a reason for hiding this comment

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

Pain

@csillag csillag requested a review from lukaw3d March 25, 2023 07:25
@csillag
Copy link
Contributor Author

csillag commented Mar 25, 2023

There is one more thing we should consider. When displaying TX details, we can say "Hash" or "ETH hash" based on what data we find. But how to handle tables? In the header, we currently say "Hash", even if for some (or all) of the rows will have and ETH hash instead. Is this acceptable? Can we simply call both Oasis and ETH hashes "hash"? If yes, then maybe we shouldn't even try to differentiate in TX details, either..

Copy link
Member

@lukaw3d lukaw3d left a comment

Choose a reason for hiding this comment

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

I think yes

(Also simplify code a bit, and handle some copy-paste errors from earlier)
@csillag csillag merged commit 0ec1d1d into master Mar 25, 2023
@csillag csillag deleted the csillag/display-eth-hash branch March 25, 2023 22:12
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.

How to find the same transaction in other explorers?
2 participants