base64 encoding for pubkey on homepage
This commit is contained in:
parent
a112127247
commit
5018d45908
@ -1,6 +1,7 @@
|
|||||||
package webapi
|
package webapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/base64"
|
||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
@ -11,7 +12,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type vspStats struct {
|
type vspStats struct {
|
||||||
PubKey []byte
|
PubKey string
|
||||||
TotalTickets int
|
TotalTickets int
|
||||||
FeeConfirmedTickets int
|
FeeConfirmedTickets int
|
||||||
VSPFee float64
|
VSPFee float64
|
||||||
@ -43,7 +44,7 @@ func updateVSPStats(db *database.VspDatabase, cfg Config) error {
|
|||||||
defer statsMtx.Unlock()
|
defer statsMtx.Unlock()
|
||||||
|
|
||||||
stats = &vspStats{
|
stats = &vspStats{
|
||||||
PubKey: signPubKey,
|
PubKey: base64.StdEncoding.EncodeToString(signPubKey),
|
||||||
TotalTickets: total,
|
TotalTickets: total,
|
||||||
FeeConfirmedTickets: feeConfirmed,
|
FeeConfirmedTickets: feeConfirmed,
|
||||||
VSPFee: cfg.VSPFee,
|
VSPFee: cfg.VSPFee,
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<strong>Support:</strong> <a href="mailto:{{ .VspStats.SupportEmail }}" rel="noopener noreferrer">{{ .VspStats.SupportEmail }}</a>
|
<strong>Support:</strong> <a href="mailto:{{ .VspStats.SupportEmail }}" rel="noopener noreferrer">{{ .VspStats.SupportEmail }}</a>
|
||||||
<br />
|
<br />
|
||||||
<strong>VSP public key:</strong> <span class="code">{{ printf "%x" .VspStats.PubKey }}</span>
|
<strong>VSP public key:</strong> <span class="code">{{ .VspStats.PubKey }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user