Closed lyricnz closed 2 years ago
I think I've figured out this bug. During config load, it calls SetupConfig => LoadPortfolioFromConfig => SetPortfolioEntry => ct.Save() Which saves the current (half-loaded) configuration back to the file
It's a bit random because the order the config elements are processed in is random (it's looping across a map).
https://github.com/cointop-sh/cointop/blob/master/cointop/config.go#L579
I fixed this in the portfolio-holdings PR that's coming up https://github.com/cointop-sh/cointop/pull/243/commits/ac3acbc6b1e50e122d2923405f69620c771f32dc
While working on a PR that involves adding some columns #243 , I've noticed that cointop frequently overwrites my configuration with the defaults. This may be related to #233.
Maybe it would be better if cointop never wrote the configuration file - per #238