Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- fix: sort currency order for form without api key [DV-3529]
- chore: reuse errors across multiple exchange clients [DV-3544]
- fix: exclude unconfirmed transactions for tx-find [DV-3528]
- feat: added new receipt email mustache template support [DV-3540]
- fix: panic in Binance GetOrderRule when handling USDT pairs [DV-3558]

## [0.9.7] - 2025-09-22
- Fix rename ResetPasswordCode to Code for consistency in user notifications [DV-3403]
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/cbroglie/mustache v1.4.0
github.com/dv-net/dv-processing v0.9.5-RC01
github.com/dv-net/dv-proto v0.5.1
github.com/dv-net/email-template v0.1.4
github.com/dv-net/email-template v0.1.5-0.20251010104137-d269cfd03a5f
github.com/dv-net/go-bip39 v1.1.1
github.com/dv-net/mx v0.1.1
github.com/dv-net/xconfig v0.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ github.com/dv-net/dv-processing v0.9.5-RC01 h1:vw0YDcn8CYuhvk+vFqln3irMINgdqU6Ak
github.com/dv-net/dv-processing v0.9.5-RC01/go.mod h1:8qz80xHkRHLeS9vWts/zagz6po3lRvHHLvuq1Ki97I8=
github.com/dv-net/dv-proto v0.5.1 h1:SUmKb2ja7qyMz6g4z0Jw/y+US7F0zq4qUYq1kFoSv2M=
github.com/dv-net/dv-proto v0.5.1/go.mod h1:X8D+6FZu/YX0hL+Tb2LhozNUdVcQgcLMsmTW9MrZl5o=
github.com/dv-net/email-template v0.1.4 h1:LjHE8lYHqrk9WuumNCH/QfDVCC7YDr/qBwHO7IfbmDc=
github.com/dv-net/email-template v0.1.4/go.mod h1:Qbt8pjxHwdOb1XUWDhLjtEPIODWDOYdt6Y10SOAdTBw=
github.com/dv-net/email-template v0.1.5-0.20251010104137-d269cfd03a5f h1:DHSMVb05JLHqf0NJQjkmTExZXtUTAqOInQOUpxqoDow=
github.com/dv-net/email-template v0.1.5-0.20251010104137-d269cfd03a5f/go.mod h1:Qbt8pjxHwdOb1XUWDhLjtEPIODWDOYdt6Y10SOAdTBw=
github.com/dv-net/go-bip39 v1.1.1 h1:KRJwVNjgJPipMfwVN0qbAJG17fMu4BvjDD/tnP35ers=
github.com/dv-net/go-bip39 v1.1.1/go.mod h1:zbcC/5LED0EfiNZdvDoLgcyl+9mfMH/bEQdxTn4hj/Q=
github.com/dv-net/mx v0.1.1 h1:+Y02hBmGY2JRxUR/kHM+TPbs8863CVnxrYsukXDR8CI=
Expand Down
2 changes: 2 additions & 0 deletions internal/service/notification_sender/mail_sender/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ func (svc *Service) handleUserCryptoReceipt(_ context.Context, email string, enc
NetworkFeeAmount: pBody.NetworkFeeAmount,
NetworkFeeCurrency: pBody.NetworkFeeCurrency,
NetworkFeeUSD: pBody.NetworkFeeUSD,
StoreName: pBody.StoreName,
StoreUserID: pBody.StoreUserID,
}

body, err := svc.templateSvc.AssembleEmail(emailParams)
Expand Down
2 changes: 2 additions & 0 deletions internal/service/notify/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ type UserCryptoReceiptNotificationData struct {
PlatformFeeAmount string `json:"platform_fee_amount"`
PlatformFeeUSD string `json:"platform_fee_usd"`
PlatformFeeCurrency string `json:"platform_fee_currency"`
StoreUserID string `json:"store_user_id"`
StoreName string `json:"store_name"`
}

func (d *UserCryptoReceiptNotificationData) Encode() ([]byte, error) {
Expand Down
5 changes: 5 additions & 0 deletions internal/service/templater/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ type CryptoReceiptI18N struct {
Subject string `json:"subject"`
} `json:"email"`
TitleLabel string `json:"title_label"`
TokenLabel string `json:"token_label"`
PaymentStatus struct {
Pending string `json:"pending"`
Completed string `json:"completed"`
Expand All @@ -439,6 +440,8 @@ type CryptoReceiptI18N struct {
PaymentTypeLabel string `json:"payment_type_label"`
PaymentBlockchainLabel string `json:"payment_blockchain_label"`
TransactionHashLabel string `json:"transaction_hash_label"`
StoreNameLabel string `json:"store_name_label"`
StoreUserIdLabel string `json:"store_user_id_label"` //nolint:revive
Payment struct {
AmountLabel string `json:"amount_label"`
NetworkLabelPrefix string `json:"network_label_prefix"`
Expand Down Expand Up @@ -482,6 +485,8 @@ type UserCryptoReceiptPayload struct {
PlatformFeeAmount string `json:"platform_fee_amount"`
PlatformFeeUSD string `json:"platform_fee_usd"`
PlatformFeeCurrency string `json:"platform_fee_currency"`
StoreName string `json:"store_name"`
StoreUserID string `json:"store_user_id"`
}

// Simple methods for dynamic text resolution (called by mustache as simple methods)
Expand Down
2 changes: 2 additions & 0 deletions internal/service/transactions/event_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ func (s *Service) handleDepositReceiptSent(ev event.IEvent) error {
PlatformFeeAmount: decimal.Zero.String(),
PlatformFeeUSD: decimal.Zero.String(),
PlatformFeeCurrency: currency.Code,
StoreName: storeData.Name,
StoreUserID: convertedEv.GetStoreExternalID(),
}, &models.NotificationArgs{
StoreID: util.Pointer(storeData.ID),
})
Expand Down