Display fee in DCR rather than atoms.
This commit is contained in:
parent
c3eeb1eb5c
commit
dad662b0f0
@ -7,6 +7,8 @@ import (
|
||||
"html/template"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/decred/dcrd/dcrutil/v4"
|
||||
)
|
||||
|
||||
func addressURL(blockExplorerURL string) func(string) string {
|
||||
@ -47,3 +49,7 @@ func indentJSON(input string) template.HTML {
|
||||
|
||||
return template.HTML(indented.String())
|
||||
}
|
||||
|
||||
func atomsToDCR(atoms int64) string {
|
||||
return dcrutil.Amount(atoms).String()
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Fee Amount</th>
|
||||
<td>{{ .Ticket.FeeAmount }} atoms</td>
|
||||
<td>{{ atomsToDCR .Ticket.FeeAmount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Fee Expiration</th>
|
||||
|
||||
@ -183,6 +183,7 @@ func router(debugMode bool, cookieSecret []byte, dcrd rpc.DcrdConnect, wallets r
|
||||
"dateTime": dateTime,
|
||||
"stripWss": stripWss,
|
||||
"indentJSON": indentJSON,
|
||||
"atomsToDCR": atomsToDCR,
|
||||
})
|
||||
|
||||
router.LoadHTMLGlob("webapi/templates/*.html")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user