telegram: prevent sending error in case of no opened position

This commit is contained in:
Michal Jirman 2024-02-02 21:44:27 +05:45
parent b5cd5aa5ef
commit f8175a9cfe
No known key found for this signature in database
GPG Key ID: 9503107A53007ACF

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:")