fix for proto migration
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user