From 66646f7027186574d8db391502b35f8286369903 Mon Sep 17 00:00:00 2001 From: Geoffrey Ragot Date: Mon, 29 Aug 2022 17:35:32 +0200 Subject: [PATCH] fix: payments publish --- pkg/bridge/ingestion/ingester.go | 2 +- pkg/bridge/ingestion/message.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/bridge/ingestion/ingester.go b/pkg/bridge/ingestion/ingester.go index 558d5aeb..8a0a882c 100644 --- a/pkg/bridge/ingestion/ingester.go +++ b/pkg/bridge/ingestion/ingester.go @@ -212,7 +212,7 @@ func (i *defaultIngester) Ingest(ctx context.Context, batch Batch, commitState a for _, e := range allPayments { i.publish(ctx, TopicPayments, NewEventSavedPayment( - SavedPayment(e.Computed()))) + e.Computed())) } } diff --git a/pkg/bridge/ingestion/message.go b/pkg/bridge/ingestion/message.go index bf8d52ce..389a4983 100644 --- a/pkg/bridge/ingestion/message.go +++ b/pkg/bridge/ingestion/message.go @@ -26,9 +26,7 @@ type EventMessage struct { Payload json.RawMessage `json:"payload"` } -type SavedPayment payments.ComputedPayment - -func NewEventSavedPayment(payment SavedPayment) EventMessage { +func NewEventSavedPayment(payment payments.ComputedPayment) EventMessage { payload, err := json.Marshal(payment) if err != nil { panic(err)