From 61d95a4c346b963e196c5e6702a00f3467a704c1 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 17 May 2021 00:53:19 +0800 Subject: [PATCH] render trade time --- pkg/types/trade.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/types/trade.go b/pkg/types/trade.go index 1f639c15f..e39590d3b 100644 --- a/pkg/types/trade.go +++ b/pkg/types/trade.go @@ -4,6 +4,7 @@ import ( "database/sql" "fmt" "sync" + "time" "github.com/slack-go/slack" @@ -102,10 +103,10 @@ func (trade Trade) SlackAttachment() slack.Attachment { } liquidity := trade.Liquidity() - title := util.Render(slackTradeTextTemplate, trade) + text := util.Render(slackTradeTextTemplate, trade) return slack.Attachment{ - Title: title, - // Text: text, + Text: text, + // Title: ... // Pretext: pretext, Color: color, Fields: []slack.AttachmentField{ @@ -117,8 +118,7 @@ func (trade Trade) SlackAttachment() slack.Attachment { {Title: "FeeCurrency", Value: trade.FeeCurrency, Short: true}, {Title: "Liquidity", Value: liquidity, Short: true}, }, - // Footer: tradingCtx.TradeStartTime.Format(time.RFC822), - // FooterIcon: "", + Footer: util.Render("trade time {{ . }}", trade.Time.Time().Format(time.RFC822)), } }