We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d8e8cdd + 51ed1cd commit 23da40fCopy full SHA for 23da40f
pkg/types/order.go
@@ -285,7 +285,7 @@ func (o *SubmitOrder) SlackAttachment() slack.Attachment {
285
}
286
287
func (o *SubmitOrder) amountField() *slack.AttachmentField {
288
- if o.Price.Sign() < 0 || o.Quantity.Sign() < 0 || len(o.Market.QuoteCurrency) == 0 {
+ if o.Price.Sign() < 0 || o.Quantity.Sign() < 0 {
289
return nil
290
291
if currency.IsFiatCurrency(o.Market.QuoteCurrency) {
@@ -295,6 +295,8 @@ func (o *SubmitOrder) amountField() *slack.AttachmentField {
295
Short: true,
296
297
298
+
299
+ // NOTE: o.Market.QuoteCurrency might be empty
300
return &slack.AttachmentField{
301
Title: "Amount",
302
Value: fmt.Sprintf("%s %s", o.Price.Mul(o.Quantity).String(), o.Market.QuoteCurrency),
0 commit comments