Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Add sharechains to /v1/common api endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
icook committed Jan 12, 2018
1 parent 07bebb6 commit 379d4b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions cmd/ngweb/handler_public.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func (q *NgWebAPI) getBlock(c *gin.Context) {
func (q *NgWebAPI) getCommon(c *gin.Context) {
q.apiSuccess(c, 200, res{
"raw_currencies": service.RawCurrencyConfig,
"sharechains": service.ShareChain,
"currencies": service.CurrencyConfig,
"algos": service.AlgoConfig,
})
Expand Down
10 changes: 5 additions & 5 deletions pkg/service/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
)

type ShareChainConfig struct {
Name string
PayoutMethod string
Fee float64
AlgoName string `mapstructure:"algo"`
Algo *Algo `mapstructure:"-"`
Name string `json:"name"`
PayoutMethod string `json:"payout_method"`
Fee float64 `json:"fee"`
AlgoName string `mapstructure:"algo" json:"algo"`
Algo *Algo `mapstructure:"-" json:"-"`
}

var ShareChain = map[string]*ShareChainConfig{}
Expand Down

0 comments on commit 379d4b1

Please sign in to comment.