Skip to content

Commit

Permalink
Display stake price instead of ETH price (closes #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
k1rill-fedoseev committed Nov 26, 2021
1 parent 4fe6874 commit 1a9e309
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions price/price.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type EthPrice struct {
Usd float64 `json:"usd"`
Gbp float64 `json:"gbp"`
Aud float64 `json:"aud"`
} `json:"ethereum"`
} `json:"xdai-stake"`
}

var ethPrice = new(EthPrice)
Expand All @@ -40,7 +40,7 @@ func updateEthPrice() {

func fetchPrice() {
client := &http.Client{Timeout: time.Second * 10}
resp, err := client.Get("https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd%2Ceur%2Crub%2Ccny%2Ccad%2Cjpy%2Cgbp%2Caud")
resp, err := client.Get("https://api.coingecko.com/api/v3/simple/price?ids=xdai-stake&vs_currencies=usd%2Ceur%2Crub%2Ccny%2Ccad%2Cjpy%2Cgbp%2Caud")

if err != nil {
logger.Errorf("error retrieving ETH price: %v", err)
Expand Down

0 comments on commit 1a9e309

Please sign in to comment.