{{ define "ticket-search-result" }} {{ if .Found }}

Ticket

{{ if .Ticket.Confirmed }} {{ else }} {{ end }}
Hash {{ .Ticket.Hash }}
Status Confirmed (purchase height: {{ .Ticket.PurchaseHeight }}) Not confirmed
Ticket Outcome {{ .Ticket.Outcome }}
Voting WIF {{ .Ticket.VotingWIF }}
Commitment Address {{ .Ticket.CommitmentAddress }}

Fee

Fee Address {{ .Ticket.FeeAddress }} (XPub ID: {{ .Ticket.FeeAddressXPubID }} Address: {{ .Ticket.FeeAddressIndex }})
Fee Amount {{ atomsToDCR .Ticket.FeeAmount }}
Fee Expiration {{ .Ticket.FeeExpiration }} ({{ dateTime .Ticket.FeeExpiration }})
Fee Tx Hash {{ .Ticket.FeeTxHash }}
Fee Tx {{ if .Ticket.FeeTxHex }}
Raw Bytes
{{ .Ticket.FeeTxHex }}
Decoded
{{ indentJSON .FeeTxDecoded }}
{{ end }}
Fee Tx Status {{ .Ticket.FeeTxStatus }}

Vote Choices

Consensus Vote Choices {{ range $key, $value := .Ticket.VoteChoices }} {{ $key }}: {{ $value }}
{{ end }}
TSpend Policy {{ range $key, $value := .Ticket.TSpendPolicy }} {{ $key }}: {{ $value }}
{{ end }}
Treasury Policy {{ range $key, $value := .Ticket.TreasuryPolicy }} {{ $key }}: {{ $value }}
{{ end }}
Vote Choice Changes
({{ .MaxVoteChanges }} most recent)
{{ range $key, $value := .VoteChanges }}
{{ if eq $key 0}} Initial choices {{ else }} Change {{ $key }} {{ end }}
Request
{{ indentJSON $value.Request }}
Request
Signature
{{ $value.RequestSignature }}
Response
{{ indentJSON $value.Response }}
Response
Signature
{{ $value.ResponseSignature }}
{{end}}

Alternate Signing Address

Alternate Signing Address {{if .AltSignAddrData}} {{ .AltSignAddrData.AltSignAddr }} {{end}}
AltSignAddress Change {{if .AltSignAddrData}}
Request
{{ indentJSON .AltSignAddrData.Req }}
Request
Signature
{{ .AltSignAddrData.ReqSig }}
Response
{{ indentJSON .AltSignAddrData.Resp }}
Response
Signature
{{ .AltSignAddrData.RespSig }}
{{end}}
{{ else }}

No ticket found with hash {{ .Hash }}

{{ end }} {{ end }}