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