diff --git a/pkg/types/deposit.go b/pkg/types/deposit.go index 0a1853ec1..d45a4da24 100644 --- a/pkg/types/deposit.go +++ b/pkg/types/deposit.go @@ -28,6 +28,21 @@ const ( DepositCredited = DepositStatus("credited") ) +func (s DepositStatus) SlackEmoji() string { + switch s { + case DepositPending: + return ":hourglass_not_done:" + case DepositCredited: + return ":dollar_banknote:" + case DepositSuccess: + return ":check_mark_button:" + case DepositCancelled: + return ":stop_button:" + } + + return "" +} + type Deposit struct { GID int64 `json:"gid" db:"gid"` Exchange ExchangeName `json:"exchange" db:"exchange"` @@ -106,7 +121,7 @@ func (d *Deposit) SlackAttachment() slack.Attachment { if len(d.Status) > 0 { fields = append(fields, slack.AttachmentField{ Title: "Status", - Value: string(d.Status), + Value: string(d.Status) + " " + d.Status.SlackEmoji(), Short: false, }) }