cointop-sh / cointop

A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀

Home Page:https://cointop.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cointop keeps overwriting my non-default column selection

lyricnz opened this issue · comments

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

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
ac3acbc