From 6d90edfefdef569f1653dcb6add47b36ec7ad1f4 Mon Sep 17 00:00:00 2001 From: Simon Roberts Date: Wed, 1 Sep 2021 10:35:58 +1000 Subject: [PATCH] Pass the current coin as context! --- cointop/portfolio.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cointop/portfolio.go b/cointop/portfolio.go index 29ccc3a..3778313 100644 --- a/cointop/portfolio.go +++ b/cointop/portfolio.go @@ -436,7 +436,7 @@ func (ct *Cointop) SetPortfolioHoldings() error { } input := string(b[:n]) - holdings, err := eval.EvaluateExpressionToFloat64(input) + holdings, err := eval.EvaluateExpressionToFloat64(input, coin) if err != nil { // leave value as is if expression can't be evaluated return nil