tgsettle status optimization, + build optimization #404
@@ -9,6 +9,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/server/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/billing/documents/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/billing/fees/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -7,6 +7,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/discovery/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/server/**
|
||||||
|
- api/pkg/**
|
||||||
|
- api/proto/**
|
||||||
|
- frontend/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/fx/ingestor/**
|
||||||
|
- api/fx/storage/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -11,6 +11,14 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/fx/oracle/**
|
||||||
|
- api/fx/storage/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/gateway/chain/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/gateway/mntx/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/gateway/tgsettle/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/gateway/tron/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/ledger/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/notification/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ matrix:
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- api/payments/orchestrator/**
|
||||||
|
- api/proto/**
|
||||||
|
- api/pkg/**
|
||||||
|
ignore_message: '[REBUILD]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -253,6 +253,10 @@ func (s *Service) onIntent(ctx context.Context, intent *model.PaymentGatewayInte
|
|||||||
s.logger.Warn("Payment gateway intent rejected", zap.String("reason", "requested_money is required"), zap.String("idempotency_key", intent.IdempotencyKey))
|
s.logger.Warn("Payment gateway intent rejected", zap.String("reason", "requested_money is required"), zap.String("idempotency_key", intent.IdempotencyKey))
|
||||||
return merrors.InvalidArgument("requested_money is required", "requested_money")
|
return merrors.InvalidArgument("requested_money is required", "requested_money")
|
||||||
}
|
}
|
||||||
|
if intent.OperationRef == "" {
|
||||||
|
s.logger.Warn("Payment gateway intent rejected", zap.String("reason", "operation_ref is required"))
|
||||||
|
return merrors.InvalidArgument("operation_ref is required", "operation_ref")
|
||||||
|
}
|
||||||
if s.repo == nil || s.repo.Payments() == nil {
|
if s.repo == nil || s.repo.Payments() == nil {
|
||||||
s.logger.Warn("Payment gateway storage unavailable", zap.String("idempotency_key", intent.IdempotencyKey))
|
s.logger.Warn("Payment gateway storage unavailable", zap.String("idempotency_key", intent.IdempotencyKey))
|
||||||
return merrors.Internal("payment gateway storage unavailable")
|
return merrors.Internal("payment gateway storage unavailable")
|
||||||
@@ -274,7 +278,9 @@ func (s *Service) onIntent(ctx context.Context, intent *model.PaymentGatewayInte
|
|||||||
zap.String("payment_intent_id", confirmReq.PaymentIntentID),
|
zap.String("payment_intent_id", confirmReq.PaymentIntentID),
|
||||||
zap.String("quote_ref", confirmReq.QuoteRef),
|
zap.String("quote_ref", confirmReq.QuoteRef),
|
||||||
zap.String("rail", confirmReq.Rail),
|
zap.String("rail", confirmReq.Rail),
|
||||||
zap.String("status", string(existing.Status)))
|
zap.String("status", string(existing.Status)),
|
||||||
|
zap.String("operation_ref", confirmReq.OperationRef),
|
||||||
|
)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -609,6 +615,10 @@ func intentFromSubmitTransfer(req *chainv1.SubmitTransferRequest, defaultRail, d
|
|||||||
if paymentRef == "" {
|
if paymentRef == "" {
|
||||||
return nil, merrors.InvalidArgument("submit_transfer: payment_ref is required")
|
return nil, merrors.InvalidArgument("submit_transfer: payment_ref is required")
|
||||||
}
|
}
|
||||||
|
operationRef := strings.TrimSpace(req.OperationRef)
|
||||||
|
if operationRef == "" {
|
||||||
|
return nil, merrors.InvalidArgument("submit_transfer: operation_ref is required")
|
||||||
|
}
|
||||||
quoteRef := strings.TrimSpace(metadata[metadataQuoteRef])
|
quoteRef := strings.TrimSpace(metadata[metadataQuoteRef])
|
||||||
targetChatID := strings.TrimSpace(metadata[metadataTargetChatID])
|
targetChatID := strings.TrimSpace(metadata[metadataTargetChatID])
|
||||||
outgoingLeg := strings.TrimSpace(metadata[metadataOutgoingLeg])
|
outgoingLeg := strings.TrimSpace(metadata[metadataOutgoingLeg])
|
||||||
@@ -626,6 +636,7 @@ func intentFromSubmitTransfer(req *chainv1.SubmitTransferRequest, defaultRail, d
|
|||||||
QuoteRef: quoteRef,
|
QuoteRef: quoteRef,
|
||||||
RequestedMoney: requestedMoney,
|
RequestedMoney: requestedMoney,
|
||||||
IntentRef: intentRef,
|
IntentRef: intentRef,
|
||||||
|
OperationRef: operationRef,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user