fix for proto migration

This commit is contained in:
Stephan D
2026-02-11 18:15:04 +01:00
parent fab07fdc8e
commit 7b53ca6cef
62 changed files with 517 additions and 554 deletions

View File

@@ -5,7 +5,7 @@ import (
"github.com/tech/sendico/pkg/mlogger"
"github.com/tech/sendico/pkg/model/account_role"
chainv1 "github.com/tech/sendico/pkg/proto/gateway/chain/v1"
orchestratorv1 "github.com/tech/sendico/pkg/proto/payments/orchestrator/v1"
sharedv1 "github.com/tech/sendico/pkg/proto/payments/shared/v1"
)
const (
@@ -55,9 +55,9 @@ func EnsureExecutionRefs(payment *model.Payment) *model.ExecutionRefs {
func ExecutionQuote(
payment *model.Payment,
quote *orchestratorv1.PaymentQuote,
quoteFromSnapshot func(*model.PaymentQuoteSnapshot) *orchestratorv1.PaymentQuote,
) *orchestratorv1.PaymentQuote {
quote *sharedv1.PaymentQuote,
quoteFromSnapshot func(*model.PaymentQuoteSnapshot) *sharedv1.PaymentQuote,
) *sharedv1.PaymentQuote {
return executionQuote(payment, quote, quoteFromSnapshot)
}

View File

@@ -7,7 +7,7 @@ import (
"github.com/google/uuid"
"github.com/tech/sendico/payments/storage/model"
"github.com/tech/sendico/pkg/model/account_role"
orchestratorv1 "github.com/tech/sendico/pkg/proto/payments/orchestrator/v1"
sharedv1 "github.com/tech/sendico/pkg/proto/payments/shared/v1"
)
func ensureExecutionRefs(payment *model.Payment) *model.ExecutionRefs {
@@ -19,16 +19,16 @@ func ensureExecutionRefs(payment *model.Payment) *model.ExecutionRefs {
func executionQuote(
payment *model.Payment,
quote *orchestratorv1.PaymentQuote,
quoteFromSnapshot func(*model.PaymentQuoteSnapshot) *orchestratorv1.PaymentQuote,
) *orchestratorv1.PaymentQuote {
quote *sharedv1.PaymentQuote,
quoteFromSnapshot func(*model.PaymentQuoteSnapshot) *sharedv1.PaymentQuote,
) *sharedv1.PaymentQuote {
if quote != nil {
return quote
}
if payment != nil && payment.LastQuote != nil && quoteFromSnapshot != nil {
return quoteFromSnapshot(payment.LastQuote)
}
return &orchestratorv1.PaymentQuote{}
return &sharedv1.PaymentQuote{}
}
func ensureExecutionPlanForPlan(