mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
portfolio: Fix CryptoID balance issue and assertify tests (#1861)
* portfolio: Fix CryptoID balance issue and assertify tests * portfolio: Expand context usage, enhance tests and a few other minor improvements * portfolio: Further improvements and enhance common.IsValidCryptoAddress * config, portfolio: Use v6.DefaultConfig, switch to context.WithCancel
This commit is contained in:
@@ -409,7 +409,7 @@ func (bot *Engine) Start() error {
|
||||
|
||||
if bot.Settings.EnablePortfolioManager {
|
||||
if bot.portfolioManager == nil {
|
||||
if p, err := setupPortfolioManager(bot.ExchangeManager, bot.Settings.PortfolioManagerDelay, &bot.Config.Portfolio); err != nil {
|
||||
if p, err := setupPortfolioManager(bot.ExchangeManager, bot.Settings.PortfolioManagerDelay, bot.Config.Portfolio); err != nil {
|
||||
gctlog.Errorf(gctlog.Global, "portfolio manager unable to setup: %s", err)
|
||||
} else {
|
||||
bot.portfolioManager = p
|
||||
@@ -586,7 +586,7 @@ func (bot *Engine) Stop() {
|
||||
gctlog.Debugln(gctlog.Global, "Engine shutting down..")
|
||||
|
||||
if len(bot.portfolioManager.GetAddresses()) != 0 {
|
||||
bot.Config.Portfolio = *bot.portfolioManager.GetPortfolio()
|
||||
bot.Config.Portfolio = bot.portfolioManager.GetPortfolio()
|
||||
}
|
||||
|
||||
if bot.gctScriptManager.IsRunning() {
|
||||
|
||||
Reference in New Issue
Block a user