From d25b1786969f8f300529121f43b774e2ecdae49d Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Fri, 3 Aug 2018 05:46:36 -0700 Subject: [PATCH] Simplify the Blockfolio constructor; removes unused params --- cryptoexchanges/blockfolio/widget.go | 4 +--- main.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cryptoexchanges/blockfolio/widget.go b/cryptoexchanges/blockfolio/widget.go index c915057ee..c420a034e 100644 --- a/cryptoexchanges/blockfolio/widget.go +++ b/cryptoexchanges/blockfolio/widget.go @@ -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"), diff --git a/main.go b/main.go index 9d3bb9cb1..191763232 100644 --- a/main.go +++ b/main.go @@ -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":