Skip to content

Commit

Permalink
Simplify the Blockfolio constructor; removes unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Cummer committed Aug 3, 2018
1 parent 72c192c commit d25b178
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cryptoexchanges/blockfolio/widget.go
Expand Up @@ -7,18 +7,16 @@ import (
"log"
"net/http"

"github.com/rivo/tview"
"github.com/senorprogrammer/wtf/wtf"
)

type Widget struct {
wtf.TextWidget

app *tview.Application
device_token string
}

func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" Blockfolio ", "blockfolio", false),
device_token: wtf.Config.UString("wtf.mods.blockfolio.device_token"),
Expand Down
2 changes: 1 addition & 1 deletion main.go
Expand Up @@ -180,7 +180,7 @@ func addWidget(app *tview.Application, pages *tview.Pages, widgetName string) {
case "bittrex":
widgets = append(widgets, bittrex.NewWidget())
case "blockfolio":
widgets = append(widgets, blockfolio.NewWidget(app, pages))
widgets = append(widgets, blockfolio.NewWidget())
case "circleci":
widgets = append(widgets, circleci.NewWidget())
case "clocks":
Expand Down

0 comments on commit d25b178

Please sign in to comment.