Merge pull request #1521 from michaljirman/bugfix-telegram-no-opened-positions-error

FIX: [telegram] prevent sending error to telegram for the case of no opened position
This commit is contained in:
c9s 2024-02-03 00:38:15 +08:00 committed by GitHub
commit 80ed46e23a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -147,7 +147,7 @@ func (it *CoreInteraction) Commands(i *interact.Interact) {
position := reader.CurrentPosition() position := reader.CurrentPosition()
if position == nil || position.Base.IsZero() { if position == nil || position.Base.IsZero() {
reply.Message(fmt.Sprintf("Strategy %q has no opened position", signature)) reply.Message(fmt.Sprintf("Strategy %q has no opened position", signature))
return fmt.Errorf("strategy %T has no opened position", strategy) return nil
} }
reply.Send("Your current position:") reply.Send("Your current position:")