Skip to content

Commit

Permalink
Fixed error
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew committed Jun 9, 2018
1 parent e633d4d commit 51ce545
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blockfolio/widget.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ func (widget *Widget) Refresh() {
widget.UpdateRefreshedAt()
widget.View.SetTitle(" Blockfolio ")

positions, _ := Fetch(widget.device_token)
if _ != nil {
positions, err := Fetch(widget.device_token)
if err != nil {
return
}
widget.View.SetText(fmt.Sprintf("%s", contentFrom(positions)))
}

/* -------------------- Unexported Functions -------------------- */
func contentFrom(positions AllPositionsResponse) string {
func contentFrom(positions *AllPositionsResponse) string {
res := ""
for i := 0; i < len(positions.PositionList); i++ {
res = res + "a"
Expand Down

0 comments on commit 51ce545

Please sign in to comment.