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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: show tx & script version on tx details #1863

Merged
merged 1 commit into from Sep 17, 2021
Merged

Conversation

thi4go
Copy link
Member

@thi4go thi4go commented Sep 16, 2021

This diff adds the tx and script versions to the tx details areabox.

Edit:

Before:

image

After:

image

Let me know if any UI changes are needed for a better UX 馃憤

closes #1851

@davecgh
Copy link
Member

davecgh commented Sep 16, 2021

Every output script has an independent version. From the screenshot, it appears this is assuming there is only one script version for the entire transaction, which isn't the case.

@davecgh
Copy link
Member

davecgh commented Sep 16, 2021

I just hacked up the HTML of the first transaction I came across on the explorer, but I think this would work:

image

@thi4go
Copy link
Member Author

thi4go commented Sep 16, 2021

Hm understood @davecgh was mistakenly assuming all output scripts from a tx had to be the same version. Sweet, will add it to the outputs table 馃憤

@davecgh
Copy link
Member

davecgh commented Sep 16, 2021

To be clear, the tx version field looks good and is correct. It's just the script version that is unique per output.

@chappjc
Copy link
Member

chappjc commented Sep 16, 2021

I just hacked up the HTML of the first transaction I came across on the explorer, but I think this would work:

image

That looks good to me too. We'll just have to play with the responsive design a bit to see if anything gets wonky (e.g. resizing narrow)

@thi4go
Copy link
Member Author

thi4go commented Sep 17, 2021

@davecgh @chappjc hey mates, fixed the diff with the suggestions 馃憤

Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

Looks proper to me.

</td>
<td class="text-right medium-sans text-nowrap pr-2 py-2"
>Time:
<td class="text-right medium-sans text-nowrap pr-2 py-2">Tx Raw: </td>
Copy link
Member

Choose a reason for hiding this comment

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

Back to "Raw Tx" please. This is shorthand for something like "raw transaction data:"

</td>
<td class="text-left py-1 text-secondary">{{.FormattedSize}}</td>
<td class="text-right medium-sans text-nowrap pr-2 py-2">Rate:</td>
<td class="text-right medium-sans text-nowrap pr-2 py-2">Tx Version: </td>
Copy link
Member

@chappjc chappjc Sep 17, 2021

Choose a reason for hiding this comment

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

Just "Version" here is good, no "Tx" since this is the "Transaction Details" section.

Also, the new spaces after all these ":" seems to serve no purpose too since there's a newline after the </td> or maybe just because they are different table cells. Can you get rid of them while making these changes? Unless they actually have a visual effect, and I do not think they do (I don't see any in testing).

Comment on lines 175 to +176
*TxBasic
TxVersion int32
Copy link
Member

Choose a reason for hiding this comment

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

This works. I'm cooking up a PR to do some mempool and DB work, and in that I'm moving TxVersion to TxBasic and renaming it to just Version. Just a heads up. This is good like this for now.

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.

This works, and I have the minor requested changes in a subsequent diff that adjust the mempool structures.

@chappjc chappjc merged commit df93ebc into decred:master Sep 17, 2021
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.

Feature Request: Show Transaction and Script Versions
3 participants