Add alternate sign address to ticket search result
This commit is contained in:
parent
efa5a09820
commit
6260e4ee5b
@ -31,6 +31,7 @@ type searchResult struct {
|
|||||||
Hash string
|
Hash string
|
||||||
Found bool
|
Found bool
|
||||||
Ticket database.Ticket
|
Ticket database.Ticket
|
||||||
|
AltSig string
|
||||||
VoteChanges map[uint32]database.VoteChangeRecord
|
VoteChanges map[uint32]database.VoteChangeRecord
|
||||||
MaxVoteChanges int
|
MaxVoteChanges int
|
||||||
}
|
}
|
||||||
@ -122,11 +123,24 @@ func ticketSearch(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
altSigData, err := db.AltSigData(hash)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("db.AltSigData error (ticketHash=%s): %v", hash, err)
|
||||||
|
c.String(http.StatusInternalServerError, "Error getting alt sig from db")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
altSig := ""
|
||||||
|
if altSigData != nil {
|
||||||
|
altSig = altSigData.AltSigAddr
|
||||||
|
}
|
||||||
|
|
||||||
c.HTML(http.StatusOK, "admin.html", gin.H{
|
c.HTML(http.StatusOK, "admin.html", gin.H{
|
||||||
"SearchResult": searchResult{
|
"SearchResult": searchResult{
|
||||||
Hash: hash,
|
Hash: hash,
|
||||||
Found: found,
|
Found: found,
|
||||||
Ticket: ticket,
|
Ticket: ticket,
|
||||||
|
AltSig: altSig,
|
||||||
VoteChanges: voteChanges,
|
VoteChanges: voteChanges,
|
||||||
MaxVoteChanges: cfg.MaxVoteChangeRecords,
|
MaxVoteChanges: cfg.MaxVoteChangeRecords,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -28,6 +28,10 @@
|
|||||||
<th>Ticket Outcome</th>
|
<th>Ticket Outcome</th>
|
||||||
<td>{{ .Ticket.Outcome }}</td>
|
<td>{{ .Ticket.Outcome }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Voting WIF</th>
|
||||||
|
<td>{{ .Ticket.VotingWIF }}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Commitment Address</th>
|
<th>Commitment Address</th>
|
||||||
<td>
|
<td>
|
||||||
@ -37,8 +41,12 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Voting WIF</th>
|
<th>Alternate Signing Address</th>
|
||||||
<td>{{ .Ticket.VotingWIF }}</td>
|
<td>
|
||||||
|
<a href="{{ addressURL .AltSig }}">
|
||||||
|
{{ .AltSig }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user