Split ticket info into ticket, fee and voting info

This commit is contained in:
Jamie Holdstock 2021-05-28 19:00:43 +08:00 committed by Jamie Holdstock
parent 2cdc5a74b5
commit a1091015ff

View File

@ -138,6 +138,9 @@
{{ with .SearchResult }} {{ with .SearchResult }}
{{ if .Found }} {{ if .Found }}
<h1>Ticket</h1>
<table id="ticket-table" class="mt-2 mb-4 w-100"> <table id="ticket-table" class="mt-2 mb-4 w-100">
<tr> <tr>
<th>Hash</th> <th>Hash</th>
@ -158,14 +161,23 @@
<td>Not confirmed</td> <td>Not confirmed</td>
{{ end }} {{ end }}
</tr> </tr>
<tr>
<th>Ticket Outcome</th>
<td>{{ .Ticket.Outcome }}</td>
</tr>
<tr> <tr>
<th>Commitment Address</th> <th>Commitment Address</th>
<td>{{ .Ticket.CommitmentAddress }}</td> <td>{{ .Ticket.CommitmentAddress }}</td>
</tr> </tr>
<tr> <tr>
<th>Fee Address Index</th> <th>Voting WIF</th>
<td>{{ .Ticket.FeeAddressIndex }}</td> <td>{{ .Ticket.VotingWIF }}</td>
</tr> </tr>
</table>
<h1>Fee</h1>
<table id="ticket-table" class="mt-2 mb-4 w-100">
<tr> <tr>
<th>Fee Address</th> <th>Fee Address</th>
<td> <td>
@ -174,6 +186,10 @@
</a> </a>
</td> </td>
</tr> </tr>
<tr>
<th>Fee Address Index</th>
<td>{{ .Ticket.FeeAddressIndex }}</td>
</tr>
<tr> <tr>
<th>Fee Amount</th> <th>Fee Amount</th>
<td>{{ .Ticket.FeeAmount }} atoms</td> <td>{{ .Ticket.FeeAmount }} atoms</td>
@ -182,6 +198,27 @@
<th>Fee Expiration</th> <th>Fee Expiration</th>
<td>{{ .Ticket.FeeExpiration }} ({{ dateTime .Ticket.FeeExpiration }}) </td> <td>{{ .Ticket.FeeExpiration }} ({{ dateTime .Ticket.FeeExpiration }}) </td>
</tr> </tr>
<tr>
<th>Fee Tx Hash</th>
<td>
<a href="{{ txURL .Ticket.FeeTxHash }}">
{{ .Ticket.FeeTxHash }}
</a>
</td>
</tr>
<tr>
<th>Fee Tx</th>
<td>{{ .Ticket.FeeTxHex }}</td>
</tr>
<tr>
<th>Fee Tx Status</th>
<td>{{ .Ticket.FeeTxStatus }}</td>
</tr>
</table>
<h1>Voting</h1>
<table id="ticket-table" class="mt-2 mb-4 w-100">
<tr> <tr>
<th>Current Vote Choices</th> <th>Current Vote Choices</th>
<td> <td>
@ -227,31 +264,8 @@
{{end}} {{end}}
</td> </td>
</tr> </tr>
<tr>
<th>Voting WIF</th>
<td>{{ .Ticket.VotingWIF }}</td>
</tr>
<tr>
<th>Fee Tx Hash</th>
<td>
<a href="{{ txURL .Ticket.FeeTxHash }}">
{{ .Ticket.FeeTxHash }}
</a>
</td>
</tr>
<tr>
<th>Fee Tx</th>
<td>{{ .Ticket.FeeTxHex }}</td>
</tr>
<tr>
<th>Fee Tx Status</th>
<td>{{ .Ticket.FeeTxStatus }}</td>
</tr>
<tr>
<th>Ticket Outcome</th>
<td>{{ .Ticket.Outcome }}</td>
</tr>
</table> </table>
{{ else }} {{ else }}
<p>No ticket found with hash <span class="code">{{ .Hash }}</span></p> <p>No ticket found with hash <span class="code">{{ .Hash }}</span></p>
{{ end }} {{ end }}