ml-testing-toolkit 18.17.0-snapshot.7 → 18.17.0-snapshot.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ml-testing-toolkit",
3
3
  "description": "Testing Toolkit for Mojaloop implementations",
4
- "version": "18.17.0-snapshot.7",
4
+ "version": "18.17.0-snapshot.9",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Vijaya Kumar Guthi, ModusBox Inc. ",
7
7
  "contributors": [
@@ -147,7 +147,7 @@ const handleTransferIlp = (context, response) => {
147
147
  const transferId = response.path.match(pathMatch)[1]
148
148
  customLogger.logMessage('debug', 'Fetching stored transfer for fulfilment', { additionalData: { transferId } })
149
149
  const storedTransfer = context.storedTransfers?.[transferId]
150
- customLogger.logMessage('debug', 'Stored transfer fetched for fulfilment', { additionalData: { storedTransfer } })
150
+ customLogger.logMessage('debug', 'Stored transfer fetched for fulfilment', { additionalData: { storedTransfer, context } })
151
151
  // Check if stored request exists and is within 30 seconds
152
152
  if (storedTransfer) {
153
153
  if (storedTransfer.request.ilpPacket) {
@@ -327,7 +327,10 @@ const generateAsyncCallback = async (item, context, req) => {
327
327
  context.storedTransfers = {}
328
328
  }
329
329
  const isFxTransfer = fxTransferPathMatch.test(req.path)
330
- const transferId = (req.payload && req.payload.transferId) || (req.payload && req.payload.commitRequestId)
330
+ let transferId = (req.payload && req.payload.transferId) || (req.payload && req.payload.commitRequestId)
331
+ if (!transferId && req.payload && req.payload.CdtTrfTxInf && req.payload.CdtTrfTxInf.PmtId && req.payload.CdtTrfTxInf.PmtId.TxId) {
332
+ transferId = req.payload.CdtTrfTxInf.PmtId.TxId
333
+ }
331
334
  customLogger.logMessage('debug', 'Storing transfer for validation', { additionalData: { transferId }, request: req })
332
335
 
333
336
  context.storedTransfers[transferId] = {