{{define "txdetail"}}{{$cs := .CoinShortcut}}{{$addr := .AddrStr}}{{$tx := .Tx}}{{$data := .}}
{{- if $tx.Blocktime}}
{{if $tx.Confirmations}}mined{{else}}first seen{{end}} {{formatUnixTime $tx.Blocktime}}
{{end -}}
{{- range $vin := $tx.Vin -}} {{- else -}} {{- end -}}
{{- if $vin.Txid -}} ➡  {{- end -}} {{- range $a := $vin.Addresses -}} {{if and (ne $a $addr) $vin.Searchable}}{{$a}}{{else}}{{$a}}{{end}} {{- else -}} {{- if $vin.Hex -}}Unparsed address{{- else -}}No Inputs (Newly Generated Coins){{- end -}} {{- end -}}{{- if $vin.Addresses -}} {{formatAmount $vin.ValueSat}} {{$cs}} {{- end -}}
No Inputs
{{- range $vout := $tx.Vout -}} {{- else -}} {{- end -}}
{{- range $a := $vout.Addresses -}} {{- if and (ne $a $addr) $vout.Searchable}}{{$a}}{{else}}{{$a}}{{- end -}} {{- else -}} Unparsed address {{- end -}} {{formatAmount $vout.ValueSat}} {{$cs}} {{if $vout.Spent}}{{else -}} × {{- end -}}
No Outputs
{{- if $tx.FeesSat -}} Fee: {{formatAmount $tx.FeesSat}} {{$cs}} {{- end -}}
{{- if $tx.Confirmations -}} {{$tx.Confirmations}} Confirmations {{- else -}} Unconfirmed Transaction! {{- end -}} {{formatAmount $tx.ValueOutSat}} {{$cs}}
{{end}}