Fixed billing fees unreachable error propagation. Added USDT ledger creation. Fixed ledger boundaries operation types

This commit is contained in:
Stephan D
2026-02-26 16:25:52 +01:00
parent 54e5c799e8
commit 336f352858
37 changed files with 838 additions and 302 deletions

View File

@@ -104,14 +104,20 @@ func ExpandRailOperation(value string) []string {
}
switch strings.ToLower(strings.TrimSpace(value)) {
case OperationExternalDebit, "external_debit":
return []string{RailOperationExternalDebit}
case OperationExternalCredit, "external_credit":
return []string{RailOperationExternalCredit}
case "payin", "payin.crypto", "payin.fiat", "payin.card":
return []string{RailOperationExternalDebit}
case "payout", "payout.crypto", "payout.fiat", "payout.card":
return []string{RailOperationExternalCredit, RailOperationSend}
case "fee.send", "fees.send":
case "fee.send", "fees.send", OperationFee:
return []string{RailOperationFee}
case "observe.confirm", "observe_confirm":
case OperationObserveConfirm, "observe_confirm":
return []string{RailOperationObserveConfirm}
case OperationFXConvert, "fx_convert":
return []string{RailOperationFXConvert}
case "funds.block", "hold.balance", "block":
return []string{RailOperationBlock}
case "funds.release", "release", "unblock":
@@ -147,6 +153,13 @@ func NormalizeRailOperations(values []string) []string {
// CryptoRailGatewayOperations returns canonical operations for crypto rail gateways.
func CryptoRailGatewayOperations() []string {
return []string{
OperationBalanceRead,
OperationSend,
OperationExternalDebit,
OperationExternalCredit,
OperationFee,
OperationObserveConfirm,
// Legacy rail tokens retained for backward compatibility.
RailOperationSend,
RailOperationExternalDebit,
RailOperationExternalCredit,
@@ -158,6 +171,10 @@ func CryptoRailGatewayOperations() []string {
// CardPayoutRailGatewayOperations returns canonical operations for card payout gateways.
func CardPayoutRailGatewayOperations() []string {
return []string{
OperationSend,
OperationExternalCredit,
OperationObserveConfirm,
// Legacy rail tokens retained for backward compatibility.
RailOperationSend,
RailOperationExternalCredit,
RailOperationObserveConfirm,
@@ -167,6 +184,9 @@ func CardPayoutRailGatewayOperations() []string {
// ProviderSettlementRailGatewayOperations returns canonical operations for settlement gateways.
func ProviderSettlementRailGatewayOperations() []string {
return []string{
OperationFXConvert,
OperationObserveConfirm,
// Legacy rail tokens retained for backward compatibility.
RailOperationFXConvert,
RailOperationObserveConfirm,
}