Explorer redesign part 3
This commit is contained in:
parent
86743cfca5
commit
12ca86c601
@ -29,6 +29,14 @@ a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
select {
|
||||
border-radius: 0.5rem;
|
||||
padding-left: 0.5rem;
|
||||
border: 1px solid #ced4da;
|
||||
color: var(--bs-body-color);
|
||||
min-height: 45px;
|
||||
}
|
||||
|
||||
#header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -55,6 +63,16 @@ a:hover {
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
vertical-align: middle;
|
||||
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.15em;
|
||||
--bs-badge-padding-x: 0.8rem;
|
||||
--bs-badge-font-weight: normal;
|
||||
--bs-badge-border-radius: 0.6rem;
|
||||
}
|
||||
|
||||
.bb-group {
|
||||
border: 0.6rem solid #f6f6f6;
|
||||
background-color: #f6f6f6;
|
||||
@ -211,6 +229,11 @@ span.btn-paging:hover {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.data-table tbody th {
|
||||
color: #757575;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.data-table tbody {
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
@ -218,12 +241,14 @@ span.btn-paging:hover {
|
||||
}
|
||||
|
||||
.data-table h3,
|
||||
.data-table h5,
|
||||
.data-table h6 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.data-table h3 {
|
||||
color: black;
|
||||
.data-table h3,
|
||||
.data-table h5 {
|
||||
color: var(--bs-body-color);
|
||||
}
|
||||
|
||||
.info-table tbody {
|
||||
@ -304,7 +329,7 @@ span.btn-paging:hover {
|
||||
}
|
||||
|
||||
.tx-detail:last-child {
|
||||
margin-bottom: 3rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.tx-detail span.ellipsis,
|
||||
@ -392,6 +417,16 @@ span.btn-paging:hover {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.txerror {
|
||||
background-color: #c51f13b3;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.txerror a,
|
||||
.txerror .txvalue {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.tx-amt .amt:hover,
|
||||
.tx-amt.amt:hover {
|
||||
color: var(--bs-body-color);
|
||||
|
||||
@ -1,213 +1,218 @@
|
||||
{{define "specific"}}{{$cs := .CoinShortcut}}{{$addr := .Address}}{{$data := .}}
|
||||
<h1>{{if $addr.ContractInfo}}Contract {{$addr.ContractInfo.Name}}{{if $addr.ContractInfo.Symbol}} ({{$addr.ContractInfo.Symbol}}){{end}}{{else}}Address{{end}} <small class="text-muted">{{formatAmount $addr.BalanceSat}} {{$cs}}</small>
|
||||
</h1>
|
||||
<div class="alert alert-data ellipsis">
|
||||
<span class="data">{{$addr.AddrStr}}</span>
|
||||
</div>
|
||||
<h3>Confirmed</h3>
|
||||
<div class="data-div row">
|
||||
<div class="col-lg-10">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
{{- if eq .ChainType 1 -}}
|
||||
{{if $addr.ContractInfo}}
|
||||
{{if $addr.ContractInfo.Type}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Contract type</td>
|
||||
<td class="data">{{$addr.ContractInfo.Type}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{if $addr.ContractInfo.CreatedInBlock}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Created in Block</td>
|
||||
<td class="data"><a href="/block/{{$addr.ContractInfo.CreatedInBlock}}">{{$addr.ContractInfo.CreatedInBlock}}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{if $addr.ContractInfo.DestructedInBlock}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Destructed in Block</td>
|
||||
<td class="data"><a href="/block/{{$addr.ContractInfo.DestructedInBlock}}">{{$addr.ContractInfo.DestructedInBlock}}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Balance</td>
|
||||
<td class="data">{{formatAmount $addr.BalanceSat}} {{$cs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Transactions</td>
|
||||
<td class="data">{{$addr.Txs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Non-contract Transactions</td>
|
||||
<td class="data">{{$addr.NonTokenTxs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Internal Transactions</td>
|
||||
<td class="data">{{$addr.InternalTxs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nonce</td>
|
||||
<td class="data">{{$addr.Nonce}}</td>
|
||||
</tr>
|
||||
{{if tokenCount $addr.Tokens "ERC20"}}
|
||||
<tr>
|
||||
<td>ERC20 Tokens</td>
|
||||
<td style="padding: 0;">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Contract</th>
|
||||
<th>Tokens</th>
|
||||
<th style="width: 15%;">Transfers</th>
|
||||
</tr>
|
||||
{{range $t := $addr.Tokens}}
|
||||
{{if eq $t.Type "ERC20"}}
|
||||
<tr>
|
||||
<td class="data ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
||||
<td class="data">{{formatAmountWithDecimals $t.BalanceSat $t.Decimals}} {{$t.Symbol}}</td>
|
||||
<td class="data">{{$t.Transfers}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{if tokenCount $addr.Tokens "ERC721"}}
|
||||
<tr>
|
||||
<td>ERC721 Tokens</td>
|
||||
<td style="padding: 0;">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Contract</th>
|
||||
<th>Tokens</th>
|
||||
<th style="width: 15%;">Transfers</th>
|
||||
</tr>
|
||||
{{range $t := $addr.Tokens}}
|
||||
{{if eq $t.Type "ERC721"}}
|
||||
<tr>
|
||||
<td class="data ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
||||
<td class="data">
|
||||
{{range $i, $iv := $t.Ids}}{{if $i}}, {{end}}<a href="/nft/{{$t.Contract}}/{{formatAmountWithDecimals $iv 0}}">{{formatAmountWithDecimals $iv 0}}</a>{{end}}
|
||||
</td>
|
||||
<td class="data">{{$t.Transfers}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{if tokenCount $addr.Tokens "ERC1155"}}
|
||||
<tr>
|
||||
<td>ERC1155 Tokens</td>
|
||||
<td style="padding: 0;">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Contract</th>
|
||||
<th>Tokens</th>
|
||||
<th style="width: 15%;">Transfers</th>
|
||||
</tr>
|
||||
{{range $t := $addr.Tokens}}
|
||||
{{if eq $t.Type "ERC1155"}}
|
||||
<tr>
|
||||
<td class="data ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
||||
<td class="data">
|
||||
{{range $i, $iv := $t.MultiTokenValues}}{{if $i}}, {{end}}{{$iv.Value}} of ID <a href="/nft/{{$t.Contract}}/{{$iv.Id}}">{{$iv.Id}}</a>{{end}}
|
||||
</td>
|
||||
<td class="data">{{$t.Transfers}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
</tr>
|
||||
{{- else -}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Total Received</td>
|
||||
<td class="data">{{formatAmount $addr.TotalReceivedSat}} {{$cs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Sent</td>
|
||||
<td class="data">{{formatAmount $addr.TotalSentSat}} {{$cs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Final Balance</td>
|
||||
<td class="data">{{formatAmount $addr.BalanceSat}} {{$cs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>No. Transactions</td>
|
||||
<td class="data">{{$addr.Txs}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{define "specific"}}{{$addr := .Address}}{{$data := .}}
|
||||
<div class="row">
|
||||
<div class="col-md-10 order-2 order-md-1">
|
||||
<h1>{{if $addr.ContractInfo}}Contract {{$addr.ContractInfo.Name}}{{if $addr.ContractInfo.Symbol}} ({{$addr.ContractInfo.Symbol}}){{end}}{{else}}Address{{end}}</h1>
|
||||
<h5 class="col-12 d-flex h-data pb-2"><span class="ellipsis copyable">{{$addr.AddrStr}}</span></h5>
|
||||
<h4>{{amount $addr.BalanceSat $data "copyable"}}</h4>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<div id="qrcode" style="width: 160px; height: 160px; float: right; padding-left: 10px;"></div>
|
||||
<div class="col-md-2 order-1 order-md-2 d-flex justify-content-center justify-content-md-end mb-3 mb-md-0">
|
||||
<div id="qrcode"></div>
|
||||
<script type="text/javascript" src="/static/js/qrcode.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
new QRCode(document.getElementById("qrcode"), { text: "{{$addr.AddrStr}}", width: 160, height: 160 });
|
||||
new QRCode(document.getElementById("qrcode"), { text: "{{$addr.AddrStr}}", width: 120, height: 120 });
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
{{- if $addr.UnconfirmedTxs -}}
|
||||
<h3>Unconfirmed</h3>
|
||||
<div class="data-div">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 25%;">Unconfirmed Balance</td>
|
||||
<td class="data">{{formatAmount $addr.UnconfirmedBalanceSat}} {{$cs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>No. Transactions</td>
|
||||
<td class="data">{{$addr.UnconfirmedTxs}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{- end}}{{if or $addr.Transactions $addr.Filter -}}
|
||||
<div class="row h-container">
|
||||
<h3 class="col-md-3">Transactions</h3>
|
||||
<select class="col-md-3" style="background-color: #eaeaea;" onchange="self.location='?filter='+options[selectedIndex].value">
|
||||
<option>All</option>
|
||||
<option {{if eq $addr.Filter "inputs" -}}selected{{end}} value="inputs">Address on input side</option>
|
||||
<option {{if eq $addr.Filter "outputs" -}}selected{{end}} value="outputs">Address on output side</option>
|
||||
{{- if $addr.Tokens -}}
|
||||
<option {{if eq $addr.Filter "0" -}}selected{{end}} value="0">Non-contract</option>
|
||||
<option {{if eq $addr.Filter "1" -}}selected{{end}} value="1">Internal</option>
|
||||
{{- range $t := $addr.Tokens -}}
|
||||
{{if eq $t.Type "ERC20"}}
|
||||
<option {{if eq $addr.Filter $t.ContractIndex -}}selected{{end}} value="{{$t.ContractIndex}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}} (ERC20)</option>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range $t := $addr.Tokens -}}
|
||||
{{if eq $t.Type "ERC721"}}
|
||||
<option {{if eq $addr.Filter $t.ContractIndex -}}selected{{end}} value="{{$t.ContractIndex}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}} (ERC721)</option>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range $t := $addr.Tokens -}}
|
||||
{{if eq $t.Type "ERC1155"}}
|
||||
<option {{if eq $addr.Filter $t.ContractIndex -}}selected{{end}} value="{{$t.ContractIndex}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}} (ERC1155)</option>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</select>
|
||||
<div class="col-md-6">
|
||||
<table class="table data-table info-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="white-space: nowrap;"><h5>Confirmed</h5></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{{if eq .ChainType 1}}
|
||||
{{if $addr.ContractInfo}}
|
||||
{{if $addr.ContractInfo.Type}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Contract type</td>
|
||||
<td>{{$addr.ContractInfo.Type}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{if $addr.ContractInfo.CreatedInBlock}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Created in Block</td>
|
||||
<td><a href="/block/{{$addr.ContractInfo.CreatedInBlock}}">{{$addr.ContractInfo.CreatedInBlock}}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{if $addr.ContractInfo.DestructedInBlock}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Destructed in Block</td>
|
||||
<td><a href="/block/{{$addr.ContractInfo.DestructedInBlock}}">{{$addr.ContractInfo.DestructedInBlock}}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Balance</td>
|
||||
<td>{{amount $addr.BalanceSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Transactions</td>
|
||||
<td>{{$addr.Txs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Non-contract Transactions</td>
|
||||
<td>{{$addr.NonTokenTxs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Internal Transactions</td>
|
||||
<td>{{$addr.InternalTxs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nonce</td>
|
||||
<td>{{$addr.Nonce}}</td>
|
||||
</tr>
|
||||
{{if tokenCount $addr.Tokens "ERC20"}}
|
||||
<tr>
|
||||
<td>ERC20 Tokens</td>
|
||||
<td style="padding: 0;">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Contract</th>
|
||||
<th>Tokens</th>
|
||||
<th style="width: 15%;">Transfers</th>
|
||||
</tr>
|
||||
{{range $t := $addr.Tokens}}
|
||||
{{if eq $t.Type "ERC20"}}
|
||||
<tr>
|
||||
<td class="data ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
||||
<td>{{formatAmountWithDecimals $t.BalanceSat $t.Decimals}} {{$t.Symbol}}</td>
|
||||
<td>{{$t.Transfers}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{if tokenCount $addr.Tokens "ERC721"}}
|
||||
<tr>
|
||||
<td>ERC721 Tokens</td>
|
||||
<td style="padding: 0;">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Contract</th>
|
||||
<th>Tokens</th>
|
||||
<th style="width: 15%;">Transfers</th>
|
||||
</tr>
|
||||
{{range $t := $addr.Tokens}}
|
||||
{{if eq $t.Type "ERC721"}}
|
||||
<tr>
|
||||
<td class="data ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
||||
<td>
|
||||
{{range $i, $iv := $t.Ids}}{{if $i}}, {{end}}<a href="/nft/{{$t.Contract}}/{{formatAmountWithDecimals $iv 0}}">{{formatAmountWithDecimals $iv 0}}</a>{{end}}
|
||||
</td>
|
||||
<td>{{$t.Transfers}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{if tokenCount $addr.Tokens "ERC1155"}}
|
||||
<tr>
|
||||
<td>ERC1155 Tokens</td>
|
||||
<td style="padding: 0;">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Contract</th>
|
||||
<th>Tokens</th>
|
||||
<th style="width: 15%;">Transfers</th>
|
||||
</tr>
|
||||
{{range $t := $addr.Tokens}}
|
||||
{{if eq $t.Type "ERC1155"}}
|
||||
<tr>
|
||||
<td class="data ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
||||
<td>
|
||||
{{range $i, $iv := $t.MultiTokenValues}}{{if $i}}, {{end}}{{$iv.Value}} of ID <a href="/nft/{{$t.Contract}}/{{$iv.Id}}">{{$iv.Id}}</a>{{end}}
|
||||
</td>
|
||||
<td>{{$t.Transfers}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr>
|
||||
<td style="width: 25%;">Total Received</td>
|
||||
<td>{{amount $addr.TotalReceivedSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Sent</td>
|
||||
<td>{{amount $addr.TotalSentSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Final Balance</td>
|
||||
<td>{{amount $addr.BalanceSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>No. Transactions</td>
|
||||
<td>{{formatInt $addr.Txs}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{if $addr.UnconfirmedTxs}}
|
||||
<table class="table data-table info-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="white-space: nowrap;"><h5>Unconfirmed</h5></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%;">Unconfirmed Balance</td>
|
||||
<td>{{amount $addr.UnconfirmedBalanceSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>No. Transactions</td>
|
||||
<td>{{formatInt $addr.UnconfirmedTxs}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{{end}}
|
||||
{{if or $addr.Transactions $addr.Filter}}
|
||||
<div class="row pt-3 pb-1">
|
||||
<h3 class="col-sm-6 col-lg-3 m-0 align-self-center">Transactions</h3>
|
||||
<div class="col-sm-6 col-lg-3 my-2 my-lg-0 align-self-center">
|
||||
<select class="w-100" onchange="self.location='?filter='+options[selectedIndex].value">
|
||||
<option>All</option>
|
||||
<option {{if eq $addr.Filter "inputs"}}selected{{end}} value="inputs">Address on input side</option>
|
||||
<option {{if eq $addr.Filter "outputs"}}selected{{end}} value="outputs">Address on output side</option>
|
||||
{{if $addr.Tokens}}
|
||||
<option {{if eq $addr.Filter "0"}}selected{{end}} value="0">Non-contract</option>
|
||||
<option {{if eq $addr.Filter "1"}}selected{{end}} value="1">Internal</option>
|
||||
{{range $t := $addr.Tokens}}
|
||||
{{if eq $t.Type "ERC20"}}
|
||||
<option {{if eq $addr.Filter $t.ContractIndex}}selected{{end}} value="{{$t.ContractIndex}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}} (ERC20)</option>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{range $t := $addr.Tokens}}
|
||||
{{if eq $t.Type "ERC721"}}
|
||||
<option {{if eq $addr.Filter $t.ContractIndex}}selected{{end}} value="{{$t.ContractIndex}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}} (ERC721)</option>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{range $t := $addr.Tokens}}
|
||||
{{if eq $t.Type "ERC1155"}}
|
||||
<option {{if eq $addr.Filter $t.ContractIndex}}selected{{end}} value="{{$t.ContractIndex}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}} (ERC1155)</option>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{template "paging" $data}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="data-div">
|
||||
{{- range $tx := $addr.Transactions}}{{$data := setTxToTemplateData $data $tx}}{{template "txdetail" $data}}{{end -}}
|
||||
<div>
|
||||
{{range $tx := $addr.Transactions}}{{$data := setTxToTemplateData $data $tx}}{{template "txdetail" $data}}{{end}}
|
||||
</div>
|
||||
{{template "paging" $data }}
|
||||
{{end}}{{end}}
|
||||
@ -1,4 +1,4 @@
|
||||
{{define "specific"}}{{$cs := .CoinShortcut}}{{$b := .Block}}{{$data := . -}}
|
||||
{{define "specific"}}{{$cs := .CoinShortcut}}{{$b := .Block}}{{$data := .}}
|
||||
<div class="row">
|
||||
<h1 class="col-sm-6">Block</h1>
|
||||
<nav class="col-sm-6 paging justify-content-end pb-1">
|
||||
@ -64,13 +64,13 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{- if $b.Transactions -}}
|
||||
<div class="row pt-3">
|
||||
<h3 class="col-md-6">Transactions</h3>
|
||||
{{if $b.Transactions}}
|
||||
<div class="row pt-3 pb-1">
|
||||
<h3 class="col-md-6 align-self-center">Transactions</h3>
|
||||
<div class="col-md-6">{{template "paging" $data}}</div>
|
||||
</div>
|
||||
<div>
|
||||
{{- range $tx := $b.Transactions}}{{$data := setTxToTemplateData $data $tx}}{{template "txdetail" $data}}{{end -}}
|
||||
{{range $tx := $b.Transactions}}{{$data := setTxToTemplateData $data $tx}}{{template "txdetail" $data}}{{end}}
|
||||
</div>
|
||||
{{template "paging" $data }}
|
||||
{{end}}{{end}}
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="col-md-6"><h1>Blocks</h1></div>
|
||||
<div class="col-md-6">{{if $blocks.Blocks}}{{template "paging" $data }}{{end}}</div>
|
||||
</row>
|
||||
{{if $blocks.Blocks -}}
|
||||
{{if $blocks.Blocks}}
|
||||
<div>
|
||||
<table class="table table-hover data-table">
|
||||
<thead>
|
||||
@ -16,7 +16,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{- range $b := $blocks.Blocks -}}
|
||||
{{range $b := $blocks.Blocks}}
|
||||
<tr>
|
||||
<td><a href="/block/{{$b.Height}}">{{formatUint32 $b.Height}}</a></td>
|
||||
<td class="ellipsis">{{$b.Hash}}</td>
|
||||
@ -24,7 +24,7 @@
|
||||
<td class="text-end">{{formatUint32 $b.Txs}}</td>
|
||||
<td class="text-end">{{formatUint32 $b.Size}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
{{define "specific"}}{{$cs := .CoinShortcut}}{{$bb := .Info.Blockbook}}{{$be := .Info.Backend}}
|
||||
<h1>Application status</h1>
|
||||
{{- if $bb.InitialSync -}}
|
||||
{{if $bb.InitialSync}}
|
||||
<h3><span class="badge bg-danger text-white p-3 w-100" style="white-space: break-spaces;">Application is now in initial synchronization and does not provide any data.</span></h3>
|
||||
{{- end -}}
|
||||
{{- if not $bb.SyncMode -}}
|
||||
{{end}}
|
||||
{{if not $bb.SyncMode}}
|
||||
<h3><span class="badge bg-warning text-white p-3 w-100" style="white-space: break-spaces;">Synchronization with backend is disabled, the state of index is not up to date.</span></h3>
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<table class="table data-table info-table">
|
||||
@ -50,7 +50,7 @@
|
||||
<td>Transactions in Mempool</td>
|
||||
<td>{{if .InternalExplorer}}<a href="/mempool">{{$bb.MempoolSize}}</a>{{else}}{{formatInt $bb.MempoolSize}}{{end}}</td>
|
||||
</tr>
|
||||
{{- if $bb.HasFiatRates -}}
|
||||
{{if $bb.HasFiatRates}}
|
||||
<tr>
|
||||
<td>Current Fiat rates</td>
|
||||
<td>{{formatTime $bb.CurrentFiatRatesTime}}</td>
|
||||
@ -59,7 +59,7 @@
|
||||
<td>Historical Fiat rates</td>
|
||||
<td>{{formatTime $bb.HistoricalFiatRatesTime}}{{if $bb.HasTokenFiatRates}}<br>tokens {{formatTime $bb.HistoricalTokenFiatRatesTime}}{{end}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
<tr>
|
||||
<td>Size On Disk</td>
|
||||
<td>{{formatInt64 $bb.DbSize}}</td>
|
||||
@ -67,19 +67,19 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-6">
|
||||
<table class="table data-table info-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="white-space: nowrap;"><h3>Backend</h3></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{{- if $be.BackendError -}}
|
||||
{{if $be.BackendError}}
|
||||
<tr>
|
||||
<td>Backend Error</td>
|
||||
<td class="data text-danger">{{$be.BackendError}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
<tr>
|
||||
<td>Chain</td>
|
||||
<td>{{$be.Chain}}</td>
|
||||
@ -88,24 +88,24 @@
|
||||
<td>Version</td>
|
||||
<td>{{$be.Version}}</td>
|
||||
</tr>
|
||||
{{- if $be.Subversion -}}
|
||||
{{if $be.Subversion}}
|
||||
<tr>
|
||||
<td>Subversion</td>
|
||||
<td>{{$be.Subversion}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{- if $be.ProtocolVersion -}}
|
||||
{{end}}
|
||||
{{if $be.ProtocolVersion}}
|
||||
<tr>
|
||||
<td>Protocol Version</td>
|
||||
<td>{{$be.ProtocolVersion}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{- if $be.ConsensusVersion -}}
|
||||
{{end}}
|
||||
{{if $be.ConsensusVersion}}
|
||||
<tr>
|
||||
<td>Consensus Version</td>
|
||||
<td>{{$be.ConsensusVersion}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
<tr>
|
||||
<td>Last Block</td>
|
||||
<td>{{formatInt $be.Blocks}}</td>
|
||||
@ -114,30 +114,30 @@
|
||||
<td>Difficulty</td>
|
||||
<td>{{$be.Difficulty}}</td>
|
||||
</tr>
|
||||
{{- if $be.Timeoffset -}}
|
||||
{{if $be.Timeoffset}}
|
||||
<tr>
|
||||
<td>Timeoffset</td>
|
||||
<td>{{$be.Timeoffset}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{- if $be.SizeOnDisk -}}
|
||||
{{end}}
|
||||
{{if $be.SizeOnDisk}}
|
||||
<tr>
|
||||
<td>Size On Disk</td>
|
||||
<td>{{formatInt64 $be.SizeOnDisk}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{- if $be.Consensus -}}
|
||||
{{end}}
|
||||
{{if $be.Consensus}}
|
||||
<tr>
|
||||
<td>Consensus</td>
|
||||
<td>{{toJSON $be.Consensus}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{- if $be.Warnings -}}
|
||||
{{end}}
|
||||
{{if $be.Warnings}}
|
||||
<tr>
|
||||
<td>Warnings</td>
|
||||
<td class="data text-warning">{{$be.Warnings}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
{{define "specific" -}}
|
||||
{{define "specific"}}
|
||||
<h1>Send Raw Transaction</h1>
|
||||
<form method="POST" action="/sendtx">
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Raw transaction data</label>
|
||||
<textarea class="form-control" rows="8" name="hex">{{.SendTxHex}}</textarea>
|
||||
</div>
|
||||
<div class="form-group"><button type="submit" class="btn btn-primary">Send</button></div>
|
||||
<div class="form-group mt-3"><button type="submit" class="btn btn-outline-secondary">Send</button></div>
|
||||
</form>
|
||||
{{- if .Status -}}
|
||||
<div class="alert alert-success">{{.Status}}</div>
|
||||
{{- end -}}
|
||||
{{- if .Error -}}
|
||||
<div class="alert alert-danger">{{.Error.Text}}</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{if .Status}}
|
||||
<div class="alert alert-success mt-3">{{.Status}}</div>
|
||||
{{end}}
|
||||
{{if .Error}}
|
||||
<div class="alert alert-danger mt-3">{{.Error.Text}}</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@ -1,4 +1,4 @@
|
||||
{{define "specific"}}{{$cs := .CoinShortcut}}{{$tx := .Tx}}
|
||||
{{define "specific"}}{{$tx := .Tx}}{{$data := .}}
|
||||
<div class="row">
|
||||
<h1 class="col-12">Transaction</h1>
|
||||
</div>
|
||||
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<table class="table data-table info-table">
|
||||
<tbody>
|
||||
{{- if $tx.Confirmations -}}
|
||||
{{if $tx.Confirmations}}
|
||||
<tr>
|
||||
<td>Mined Time</td>
|
||||
<td>{{formatUnixTime $tx.Blocktime}}</td>
|
||||
@ -22,26 +22,26 @@
|
||||
<td>In Block Height</td>
|
||||
<td><a href="/block/{{$tx.Blockheight}}">{{formatInt $tx.Blockheight}}</a></td>
|
||||
</tr>{{end}}
|
||||
{{- if $tx.EthereumSpecific -}}
|
||||
{{if $tx.EthereumSpecific}}
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
{{if $tx.EthereumSpecific.Status}}
|
||||
{{if eq $tx.EthereumSpecific.Status 1}}
|
||||
<td class="text-success">Success</td>
|
||||
<td><span class="badge bg-success">Success</span></td>
|
||||
{{else}}
|
||||
{{if eq $tx.EthereumSpecific.Status -1}}
|
||||
{{if eq $tx.EthereumSpecific.Status 1}}
|
||||
<td>Pending</td>
|
||||
{{else}}
|
||||
<td>Unknown</td>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
<td class="text-danger">Fail{{if $tx.EthereumSpecific.Error}} ({{$tx.EthereumSpecific.Error}})</div>{{end}}</td>
|
||||
<td><span class="badge bg-danger">Failed</span>{{if $tx.EthereumSpecific.Error}}<span class="text-danger small fw-normal ms-1"> {{$tx.EthereumSpecific.Error}}{{end}}</td>
|
||||
{{end}}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Value</td>
|
||||
<td>{{formatAmount $tx.ValueOutSat}} {{$cs}}</td>
|
||||
<td>{{amount $tx.ValueOutSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gas Used / Limit</td>
|
||||
@ -49,16 +49,16 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gas Price</td>
|
||||
<td>{{formatAmount $tx.EthereumSpecific.GasPrice}} {{$cs}}</td>
|
||||
<td>{{amount $tx.EthereumSpecific.GasPrice $data "copyable"}}</td>
|
||||
</tr>
|
||||
{{- else -}}
|
||||
{{else}}
|
||||
<tr>
|
||||
<td>Total Input</td>
|
||||
<td>{{formatAmount $tx.ValueInSat}} {{$cs}}</td>
|
||||
<td>{{amount $tx.ValueInSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Output</td>
|
||||
<td>{{formatAmount $tx.ValueOutSat}} {{$cs}}</td>
|
||||
<td>{{amount $tx.ValueOutSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
{{if $tx.VSize}}
|
||||
<tr>
|
||||
@ -71,26 +71,26 @@
|
||||
<td>Size</td>
|
||||
<td>{{formatInt $tx.Size}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if $tx.FeesSat -}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if $tx.FeesSat}}
|
||||
<tr>
|
||||
<td>Fees</td>
|
||||
<td>{{formatAmount $tx.FeesSat}} {{$cs}}{{if $tx.Size}} ({{feePerByte $tx}}){{end}}</td>
|
||||
</tr>{{end -}}
|
||||
<td>{{amount $tx.FeesSat $data "copyable"}}{{if $tx.Size}} ({{feePerByte $tx}}){{end}}</td>
|
||||
</tr>{{end}}
|
||||
{{if not $tx.Confirmations}}
|
||||
<tr>
|
||||
<td><span tt="Replace by fee">RBF</span></td>
|
||||
<td>
|
||||
{{if $tx.Rbf}}
|
||||
<span tt="Replace by fee transaction, could be replaced.">ON</span>
|
||||
<span tt="Replace-by-Fee transaction, could be overridden by a new transaction">ON</span>
|
||||
{{else}}
|
||||
<span tt="Final transaction that can not be replaced unless it is dropped from the mempool.">OFF️</span>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end -}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Details</h3>
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
<div class="row head">
|
||||
<div class="col-xs-7 col-md-8">
|
||||
<a href="/tx/{{$tx.Txid}}" class="ellipsis copyable txid">{{$tx.Txid}}</a>
|
||||
{{- if $tx.Rbf}}<span class="ps-1" tt="Replace-by-Fee (RBF) transaction, could be overriden"> RBF</span>{{end -}}
|
||||
{{if $tx.Rbf}}<span class="ps-1" tt="Replace-by-Fee (RBF) transaction, could be overridden"> RBF</span>{{end}}
|
||||
</div>
|
||||
{{- if $tx.Blocktime}}<div class="col-xs-5 col-md-4 text-end">{{if $tx.Confirmations}}mined{{else}}first seen{{end}} <span class="txvalue">{{formatUnixTime $tx.Blocktime}}</span></div>{{end -}}
|
||||
{{if $tx.Blocktime}}<div class="col-xs-5 col-md-4 text-end">{{if $tx.Confirmations}}mined{{else}}first seen{{end}} <span class="txvalue ms-1">{{formatUnixTime $tx.Blocktime}}</span></div>{{end}}
|
||||
</div>
|
||||
<div class="row body">
|
||||
<div class="col-md-5">
|
||||
@ -32,15 +32,15 @@
|
||||
<div class="col-md-1 col-xs-12 text-center"> <span class="octicon"></span></div>
|
||||
<div class="col-md-6">
|
||||
<div class="row tx-out">
|
||||
{{- range $vout := $tx.Vout -}}
|
||||
{{range $vout := $tx.Vout}}
|
||||
<div class="col-12{{if $vout.IsOwn}} tx-own{{end}}">
|
||||
{{range $a := $vout.Addresses}}
|
||||
<span class="ellipsis tx-addr copyable">
|
||||
{{if and (ne $a $addr) $vout.IsAddress}}<a href="/address/{{$a}}">{{$a}}</a>{{else}}{{$a}}{{end}}
|
||||
</span>
|
||||
{{- else -}}
|
||||
{{else}}
|
||||
<span class="tx-addr">Unparsed address</span>
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
<span class="tx-amt">
|
||||
{{amount $vout.ValueSat $data "copyable"}}{{if $vout.Spent}}<a class="spent" href="{{if $vout.SpentTxID}}/tx/{{$vout.SpentTxID}}{{else}}/spending/{{$tx.Txid}}/{{$vout.N}}{{end}}" tt="Spent">→</a>{{else}}<span class="unspent" tt="Unspent">×</span>
|
||||
{{end}}
|
||||
@ -55,17 +55,17 @@
|
||||
</div>
|
||||
<div class="row footer">
|
||||
<div class="col-sm-12 col-md-4">
|
||||
{{- if $tx.FeesSat -}}
|
||||
{{if $tx.FeesSat}}
|
||||
Fee {{amount $tx.FeesSat $data "txvalue copyable ms-3"}}
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-8 text-end">
|
||||
<span class="me-4">
|
||||
{{- if $tx.Confirmations -}}
|
||||
{{if $tx.Confirmations}}
|
||||
<span class="txvalue">{{formatUint32 $tx.Confirmations}}</span> confirmations
|
||||
{{- else -}}
|
||||
{{else}}
|
||||
<span class="txvalue unconfirmed">Unconfirmed Transaction!</span>
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
</span>
|
||||
{{amount $tx.ValueOutSat $data "txvalue copyable"}}
|
||||
</div>
|
||||
|
||||
@ -1,107 +1,117 @@
|
||||
{{define "specific"}}{{$cs := .CoinShortcut}}{{$addr := .Address}}{{$data := .}}
|
||||
<h1>XPUB <small class="text-muted">{{formatAmount $addr.BalanceSat}} {{$cs}}</small>
|
||||
</h1>
|
||||
<div class="alert alert-data ellipsis">
|
||||
<span class="data">{{$addr.AddrStr}}</span>
|
||||
</div>
|
||||
<h3>Confirmed</h3>
|
||||
<div class="data-div row">
|
||||
<div class="col-lg-10">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 25%;">Total Received</td>
|
||||
<td class="data">{{formatAmount $addr.TotalReceivedSat}} {{$cs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Sent</td>
|
||||
<td class="data">{{formatAmount $addr.TotalSentSat}} {{$cs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Final Balance</td>
|
||||
<td class="data">{{formatAmount $addr.BalanceSat}} {{$cs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>No. Transactions</td>
|
||||
<td class="data">{{$addr.Txs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Used XPUB Addresses</td>
|
||||
<td class="data">{{$addr.UsedTokens}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{{- if or $addr.Tokens $addr.UsedTokens -}}
|
||||
<td>{{if $data.NonZeroBalanceTokens}}XPUB Addresses with Balance{{else}}XPUB Addresses{{end}}</td>
|
||||
<td style="padding: 0;">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width: 50%;">Address</th>
|
||||
<th>Balance</th>
|
||||
<th style="width: 8%;">Txs</th>
|
||||
<th style="width: 18%;">Path</th>
|
||||
</tr>
|
||||
{{- range $t := $addr.Tokens -}}
|
||||
<tr>
|
||||
<td class="data ellipsis"><a href="/address/{{$t.Name}}">{{$t.Name}}</a></td>
|
||||
<td class="data">{{formatAmount $t.BalanceSat}} {{$cs}}</td>
|
||||
<td class="data">{{$t.Transfers}}</td>
|
||||
<td>{{$t.Path}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{- if $data.NonZeroBalanceTokens -}}
|
||||
<tr>
|
||||
<td colspan="4"><a href="?tokens=used" style="float: left; margin-right: 30px;">Show used XPUB addresses</a><a href="?tokens=derived" style="float: left;">Show derived XPUB addresses</a></td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
{{- else -}}
|
||||
<td></td><td><a href="?tokens=derived" style="float: left;">Show derived XPUB addresses</a></td>
|
||||
{{- end -}}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{{define "specific"}}{{$addr := .Address}}{{$data := .}}
|
||||
<div class="row">
|
||||
<div class="col-md-10 order-2 order-md-1">
|
||||
<h1>XPUB</h1>
|
||||
<h5 class="col-12 d-flex h-data pb-2"><span class="ellipsis copyable">{{$addr.AddrStr}}</span></h5>
|
||||
<h4>{{amount $addr.BalanceSat $data "copyable"}}</h4>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<div id="qrcode" style="width: 160px; height: 160px; float: right; padding-left: 10px;"></div>
|
||||
<div class="col-md-2 order-1 order-md-2 d-flex justify-content-center justify-content-md-end mb-3 mb-md-0">
|
||||
<div id="qrcode"></div>
|
||||
<script type="text/javascript" src="/static/js/qrcode.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
new QRCode(document.getElementById("qrcode"), { text: "{{$addr.AddrStr}}", width: 160, height: 160 });
|
||||
new QRCode(document.getElementById("qrcode"), { text: "{{$addr.AddrStr}}", width: 120, height: 120 });
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
{{- if $addr.UnconfirmedTxs -}}
|
||||
<h3>Unconfirmed</h3>
|
||||
<div class="data-div">
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 25%;">Unconfirmed Balance</td>
|
||||
<td class="data">{{formatAmount $addr.UnconfirmedBalanceSat}} {{$cs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>No. Transactions</td>
|
||||
<td class="data">{{$addr.UnconfirmedTxs}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table data-table info-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="white-space: nowrap;"><h5>Confirmed</h5></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%;">Total Received</td>
|
||||
<td class="data">{{amount $addr.TotalReceivedSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Sent</td>
|
||||
<td class="data">{{amount $addr.TotalSentSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Final Balance</td>
|
||||
<td class="data">{{amount $addr.BalanceSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>No. Transactions</td>
|
||||
<td class="data">{{formatInt $addr.Txs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Used XPUB Addresses</td>
|
||||
<td class="data">{{formatInt $addr.UsedTokens}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table data-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="white-space: nowrap; width: 50%;"><h5>{{if $data.NonZeroBalanceTokens}}XPUB Addresses with Balance{{else}}XPUB Addresses{{end}}</h5></td>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
{{if $addr.Tokens}}
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<th>Balance</th>
|
||||
<th>Txs</th>
|
||||
<th>Path</th>
|
||||
</tr>
|
||||
{{range $t := $addr.Tokens}}
|
||||
<tr>
|
||||
<td class="ellipsis"><a href="/address/{{$t.Name}}" class="copyable">{{$t.Name}}</a></td>
|
||||
<td>{{amount $t.BalanceSat $data "copyable"}}</td>
|
||||
<td>{{formatInt $t.Transfers}}</td>
|
||||
<td>{{$t.Path}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<tr>
|
||||
<td colspan="4">No addresses</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
{{if $data.NonZeroBalanceTokens}}
|
||||
<a href="?tokens=used" class="ms-3 me-3">Show used XPUB addresses</a><a href="?tokens=derived">Show all derived XPUB addresses</a>
|
||||
{{else}}
|
||||
<a href="?tokens=nonzero" class="ms-3 me-3">Show XPUB addresses with nonzero balance</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{- end}}{{if or $addr.Transactions $addr.Filter -}}
|
||||
<div class="row h-container">
|
||||
<h3 class="col-md-3">Transactions</h3>
|
||||
<select class="col-md-3" style="background-color: #eaeaea;" onchange="self.location='?filter='+options[selectedIndex].value">
|
||||
<option>All</option>
|
||||
<option {{if eq $addr.Filter "inputs" -}} selected{{end}} value="inputs">XPUB addresses on input side</option>
|
||||
<option {{if eq $addr.Filter "outputs" -}} selected{{end}} value="outputs">XPUB addresses on output side</option>
|
||||
</select>
|
||||
<div class="col-md-6">
|
||||
{{if $addr.UnconfirmedTxs}}
|
||||
<table class="table data-table info-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="white-space: nowrap;"><h5>Unconfirmed</h5></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%;">Unconfirmed Balance</td>
|
||||
<td>{{amount $addr.UnconfirmedBalanceSat $data "copyable"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>No. Transactions</td>
|
||||
<td>{{formatInt $addr.UnconfirmedTxs}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{{end}}
|
||||
{{if or $addr.Transactions $addr.Filter}}
|
||||
<div class="row pt-3 pb-1">
|
||||
<h3 class="col-sm-6 col-lg-3 m-0 align-self-center">Transactions</h3>
|
||||
<div class="col-sm-6 col-lg-3 my-2 my-lg-0 align-self-center">
|
||||
<select class="w-100" onchange="self.location='?filter='+options[selectedIndex].value">
|
||||
<option>All</option>
|
||||
<option {{if eq $addr.Filter "inputs"}}selected{{end}} value="inputs">XPUB addresses on input side</option>
|
||||
<option {{if eq $addr.Filter "outputs"}}selected{{end}} value="outputs">XPUB addresses on output side</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{template "paging" $data}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="data-div">
|
||||
{{- range $tx := $addr.Transactions}}{{$data := setTxToTemplateData $data $tx}}{{template "txdetail" $data}}{{end -}}
|
||||
<div>
|
||||
{{range $tx := $addr.Transactions}}{{$data := setTxToTemplateData $data $tx}}{{template "txdetail" $data}}{{end}}
|
||||
</div>
|
||||
{{template "paging" $data }}
|
||||
{{end}}{{end}}
|
||||
Loading…
Reference in New Issue
Block a user