only show options for contract index for erc20's

pull/541/head
sidhujag 2020-09-07 20:25:00 -07:00
parent 47c69cd9be
commit a6c4ece8cc
3 changed files with 2 additions and 4 deletions

View File

@ -1174,7 +1174,6 @@ func (w *Worker) GetAddress(address string, page int, txsOnPage int, option Acco
TotalSentSat: (*bchain.Amount)(v.SentSat),
Contract: assetGuid,
Transfers: v.Transfers,
ContractIndex: assetGuid,
})
}
sort.Sort(tokens)

View File

@ -274,7 +274,6 @@ func (w *Worker) tokenFromXpubAddress(data *xpubData, ad *xpubAddress, changeInd
Path: fmt.Sprintf("%s/%d/%d", data.basePath, changeIndex, index),
Contract: assetGuid,
Transfers: v.Transfers,
ContractIndex: assetGuid,
})
}
sort.Sort(tokens)

View File

@ -134,9 +134,9 @@
<option {{if eq $addr.Filter "non-tokens" -}} selected{{end}} value="non-tokens">Non-token</option>
<option {{if eq $addr.Filter "token-transfers" -}} selected{{end}} value="token-transfers">Token transfers</option>
<option {{if eq $addr.Filter "non-token-transfers" -}} selected{{end}} value="non-token-transfers">Token non-transfers</option>
{{- range $t := $addr.Tokens -}}{{- if $t -}}
{{- range $t := $addr.Tokens -}}{{- if $t -}}{{- if $t.Type == "ERC20" -}}
<option {{if eq $addr.Filter $t.ContractIndex -}} selected{{end}} value="{{$t.ContractIndex}}">{{$t.Name}}</option>
{{- end -}}{{- end -}}
{{- end -}}{{- end -}}{{- end -}}
{{- end -}}
</select>
<div class="col-md-7">