Show tx success/failure in txdetail
This commit is contained in:
parent
9a04c862d6
commit
ec1647c864
@ -5,6 +5,7 @@ import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"math/big"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
ethcommon "github.com/ethereum/go-ethereum/common"
|
||||
@ -74,9 +75,9 @@ func erc20GetTransfersFromLog(logs []*rpcLog) ([]Erc20Transfer, error) {
|
||||
return nil, err
|
||||
}
|
||||
r = append(r, Erc20Transfer{
|
||||
Contract: l.Address,
|
||||
From: from,
|
||||
To: to,
|
||||
Contract: strings.ToLower(l.Address),
|
||||
From: strings.ToLower(from),
|
||||
To: strings.ToLower(to),
|
||||
Tokens: t,
|
||||
})
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
{{- if ne $tx.EthereumSpecific.Status 1 -}}
|
||||
<td class="data">Pending</td>
|
||||
{{- else -}}
|
||||
<td class="data text-success">Success</td>
|
||||
<td class="data text-success">Success</td>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
<td class="data text-danger">Fail</td>
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<div class="row line-bot">
|
||||
<div class="col-xs-7 col-md-8 ellipsis">
|
||||
<a href="/tx/{{$tx.Txid}}">{{$tx.Txid}}</a>
|
||||
{{if eq $tx.EthereumSpecific.Status 1}}<span class="text-success">✔</span>{{end}}{{if eq $tx.EthereumSpecific.Status 0}}<span class="text-danger">✘</span>{{end}}
|
||||
</div>
|
||||
{{- if $tx.Confirmations -}}
|
||||
<div class="col-xs-5 col-md-4 text-muted text-right">mined {{formatUnixTime $tx.Blocktime}}</div>
|
||||
@ -98,7 +99,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="ellipsis float-left">{{if ne $erc20.To $addr}}<a href="/address/{{$erc20.From}}">{{$erc20.To}}</a>{{else}}{{$erc20.To}}{{end}}</span>
|
||||
<span class="ellipsis float-left">{{if ne $erc20.To $addr}}<a href="/address/{{$erc20.To}}">{{$erc20.To}}</a>{{else}}{{$erc20.To}}{{end}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user