Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m22s
CI/CD Pipeline / Security Scanning (push) Successful in 2m30s
CI/CD Pipeline / Lint and Format (push) Failing after 44s
CI/CD Pipeline / Terraform Validation (push) Failing after 27s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 31s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 56s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
Validation / validate-genesis (push) Successful in 34s
Validation / validate-terraform (push) Failing after 39s
Validation / validate-kubernetes (push) Failing after 14s
Validation / validate-smart-contracts (push) Failing after 20s
Validation / validate-security (push) Failing after 1m19s
Validation / validate-documentation (push) Failing after 27s
Verify Deployment / Verify Deployment (push) Failing after 1m13s
Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
1.4 KiB
JavaScript
33 lines
1.4 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.bindOffice24 = bindOffice24;
|
|
const config_1 = require("../config");
|
|
/** Bind every settlement request to Office 24 (same profile as OMNL terminal). */
|
|
function bindOffice24(req) {
|
|
const cfg = (0, config_1.loadConfig)();
|
|
const profile = (0, config_1.loadOfficeProfile)();
|
|
const officeId = (0, config_1.settlementOfficeId)(req.officeId);
|
|
if (!req.idempotencyKey || !req.creditorIban || !req.amount) {
|
|
throw new Error('idempotencyKey, creditorIban, amount required');
|
|
}
|
|
return {
|
|
officeId,
|
|
valueDate: req.valueDate ?? new Date().toISOString().slice(0, 10),
|
|
currency: req.currency ?? profile.settlement.defaultCurrency ?? cfg.defaultCurrency,
|
|
moneyLayers: (req.moneyLayers ?? profile.settlement.moneyLayers),
|
|
rail: req.rail ?? 'SWIFT',
|
|
remittanceInfo: req.remittanceInfo ?? `OMNL Office 24 settlement — ${profile.externalId}`,
|
|
beneficiaryName: req.beneficiaryName ?? 'Beneficiary',
|
|
idempotencyKey: req.idempotencyKey,
|
|
creditorIban: req.creditorIban,
|
|
amount: req.amount,
|
|
debtorIban: req.debtorIban,
|
|
creditorBic: req.creditorBic,
|
|
orderingName: req.orderingName ?? profile.omnlLegalName,
|
|
swiftMessageKind: req.swiftMessageKind,
|
|
tradeFinance: req.tradeFinance,
|
|
rwaVerbiage: req.rwaVerbiage,
|
|
convertToCrypto: req.convertToCrypto,
|
|
};
|
|
}
|