1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Fixed error

This commit is contained in:
Andrew 2018-06-10 01:51:15 +03:00
parent e633d4d617
commit 51ce545833

View File

@ -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"