fix(token-aggregation): resolve mint tokenAddress without const reassignment
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m9s
CI/CD Pipeline / Security Scanning (push) Successful in 2m18s
CI/CD Pipeline / Lint and Format (push) Failing after 45s
CI/CD Pipeline / Terraform Validation (push) Failing after 23s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 24s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 41s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 27s
Validation / validate-genesis (push) Successful in 29s
Validation / validate-terraform (push) Failing after 27s
Validation / validate-kubernetes (push) Failing after 10s
Validation / validate-smart-contracts (push) Failing after 10s
Validation / validate-security (push) Failing after 1m10s
Validation / validate-documentation (push) Failing after 21s
Verify Deployment / Verify Deployment (push) Failing after 57s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 06:49:05 -07:00
parent 5229c2d888
commit c377e93849
2 changed files with 8 additions and 7 deletions

View File

@@ -15,8 +15,10 @@ if [[ ! -f "$ENV_FILE" ]]; then
fi
set -a
set +u
# shellcheck disable=SC1090
source "$ENV_FILE"
set -u
set +a
ENV_KEY="$(node -e "

View File

@@ -388,6 +388,8 @@ router.post('/omnl/settlement/token-load', async (req: Request, res: Response) =
transferableExternal: true,
};
let mintTokenAddress = resolveMintTokenAddress(lineId, symbol, tokenAddress);
if (!execute) {
res.json({
status: 'DRY_RUN',
@@ -396,7 +398,7 @@ router.post('/omnl/settlement/token-load', async (req: Request, res: Response) =
amount,
recipient,
symbol: symbol ?? null,
tokenAddress: tokenAddress ?? null,
tokenAddress: mintTokenAddress ?? null,
settlementRef: settlementRef ?? null,
moneyLayer: 'M3',
loadFromGl: '2200',
@@ -409,10 +411,7 @@ router.post('/omnl/settlement/token-load', async (req: Request, res: Response) =
return;
}
if (!tokenAddress?.startsWith('0x')) {
tokenAddress = resolveMintTokenAddress(lineId, symbol, tokenAddress);
}
if (!tokenAddress?.startsWith('0x')) {
if (!mintTokenAddress?.startsWith('0x')) {
res.status(400).json({
error: 'tokenAddress required for on-chain mint',
status: 'QUEUED',
@@ -424,7 +423,7 @@ router.post('/omnl/settlement/token-load', async (req: Request, res: Response) =
try {
const { txHash } = await executeM2TokenMint({
tokenAddress,
tokenAddress: mintTokenAddress,
recipient,
amount,
});
@@ -435,7 +434,7 @@ router.post('/omnl/settlement/token-load', async (req: Request, res: Response) =
amount,
recipient,
symbol: symbol ?? null,
tokenAddress,
tokenAddress: mintTokenAddress,
settlementRef: settlementRef ?? null,
moneyLayer: 'M3',
capabilities,