fixed rail & operation names
This commit is contained in:
@@ -2,6 +2,7 @@ package quotation
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/tech/sendico/pkg/discovery"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
@@ -16,7 +17,7 @@ import (
|
||||
|
||||
func (s *Service) resolveChainGatewayClient(ctx context.Context, network string, amount *paymenttypes.Money, actions []model.RailOperation, instanceID string, paymentRef string) (chainclient.Client, *model.GatewayInstanceDescriptor, error) {
|
||||
if s.deps.gatewayRegistry != nil && s.deps.gatewayInvokeResolver != nil {
|
||||
entry, err := selectGatewayForActions(ctx, s.deps.gatewayRegistry, model.RailCrypto, network, amount, actions, instanceID, sendDirectionForRail(model.RailCrypto))
|
||||
entry, err := selectGatewayForActions(ctx, s.deps.gatewayRegistry, discovery.RailCrypto, network, amount, actions, instanceID, sendDirectionForRail(discovery.RailCrypto))
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -68,7 +69,7 @@ func selectGatewayForActions(ctx context.Context, registry GatewayRegistry, rail
|
||||
return nil, merrors.NoData("no gateway instances available")
|
||||
}
|
||||
if len(actions) == 0 {
|
||||
actions = []model.RailOperation{model.RailOperationSend}
|
||||
actions = []model.RailOperation{discovery.RailOperationSend}
|
||||
}
|
||||
|
||||
currency := ""
|
||||
@@ -104,7 +105,7 @@ func selectGatewayForActions(ctx context.Context, registry GatewayRegistry, rail
|
||||
}
|
||||
|
||||
if len(eligible) == 0 {
|
||||
action := model.RailOperationUnspecified
|
||||
var action model.RailOperation = discovery.RailOperationUnspecified
|
||||
if len(actions) > 0 {
|
||||
action = actions[0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user