diff --git a/package-lock.json b/package-lock.json index badcda591..4f502699f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mojaloop/central-ledger", - "version": "17.9.0-iso.1", + "version": "17.9.0-snapshot.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mojaloop/central-ledger", - "version": "17.9.0-iso.1", + "version": "17.9.0-snapshot.1", "license": "Apache-2.0", "dependencies": { "@hapi/basic": "7.0.2", @@ -16,11 +16,11 @@ "@hapi/inert": "7.1.0", "@hapi/joi": "17.1.1", "@hapi/vision": "7.0.3", - "@mojaloop/central-services-error-handling": "13.0.1", + "@mojaloop/central-services-error-handling": "13.0.2", "@mojaloop/central-services-health": "15.0.0", "@mojaloop/central-services-logger": "11.5.1", "@mojaloop/central-services-metrics": "12.0.8", - "@mojaloop/central-services-shared": "18.10.0", + "@mojaloop/central-services-shared": "18.10.1-snapshot.3", "@mojaloop/central-services-stream": "11.3.1", "@mojaloop/database-lib": "11.0.6", "@mojaloop/event-sdk": "14.1.1", @@ -1498,19 +1498,12 @@ } }, "node_modules/@mojaloop/central-services-error-handling": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-error-handling/-/central-services-error-handling-13.0.1.tgz", - "integrity": "sha512-Hl0KBHX30LbF127tgqNK/fdo0hwa6Bt23tb8DesLstYawKtCesJtk9lPuo6jE+dafNeG2QusUwVQyI+7kwAUHQ==", + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-error-handling/-/central-services-error-handling-13.0.2.tgz", + "integrity": "sha512-HSxI7OrtPdA94aHNWmAD50Ve8lR6FmgOX2LaZSL/TPfx22PVTTht0eXU+IQSN/srF20f2tvCa2CdFxWBQf6Ilg==", "dependencies": { + "fast-safe-stringify": "2.1.1", "lodash": "4.17.21" - }, - "peerDependencies": { - "@mojaloop/sdk-standard-components": ">=18.x.x" - }, - "peerDependenciesMeta": { - "@mojaloop/sdk-standard-components": { - "optional": false - } } }, "node_modules/@mojaloop/central-services-health": { @@ -1625,10 +1618,9 @@ } }, "node_modules/@mojaloop/central-services-shared": { - "version": "18.10.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-18.10.0.tgz", - "integrity": "sha512-d4Pl5IBuA9a4kdmhGk7q9ojXa6z4UtGPIlPKCJvvpPps2YUGhzTlXKhregKeta3Qin0m6+9ajKQpzR4NFgbXyA==", - "license": "Apache-2.0", + "version": "18.10.1-snapshot.3", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-18.10.1-snapshot.3.tgz", + "integrity": "sha512-jLvAAj6VGPxC2PqsH0yry7YlXHook4MdYLA8VDyxdJVtJijhFjVbCj3C0c4qCUJHnufZlt+AR2/ktZ9mCndtIw==", "dependencies": { "@hapi/catbox": "12.1.1", "@hapi/catbox-memory": "5.0.1", @@ -1640,6 +1632,7 @@ "event-stream": "4.0.1", "fast-safe-stringify": "^2.1.1", "immutable": "4.3.7", + "ioredis": "^5.4.1", "lodash": "4.17.21", "mustache": "4.2.0", "openapi-backend": "5.11.0", @@ -1653,7 +1646,7 @@ }, "peerDependencies": { "@mojaloop/central-services-error-handling": ">=13.x.x", - "@mojaloop/central-services-logger": ">=11.x.x", + "@mojaloop/central-services-logger": ">=11.5.x", "@mojaloop/central-services-metrics": ">=12.x.x", "@mojaloop/event-sdk": ">=14.1.1", "ajv": "8.x.x", @@ -1812,56 +1805,6 @@ } } }, - "node_modules/@mojaloop/sdk-standard-components": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-18.1.0.tgz", - "integrity": "sha512-8g4JuVl3f9t80OEtvn9BeUtlZIW4kcL40f72FZobtqQjAZ+yz4J0BlWS/OEJDpuYV1qoyxGiuMRojKqP2Yio7g==", - "peer": true, - "dependencies": { - "base64url": "3.0.1", - "fast-safe-stringify": "^2.1.1", - "ilp-packet": "2.2.0", - "jsonwebtoken": "9.0.2", - "jws": "4.0.0" - } - }, - "node_modules/@mojaloop/sdk-standard-components/node_modules/jsonwebtoken": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", - "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", - "peer": true, - "dependencies": { - "jws": "^3.2.2", - "lodash": "^4.17.21", - "ms": "^2.1.1", - "semver": "^7.3.8" - }, - "engines": { - "node": ">=12", - "npm": ">=6" - } - }, - "node_modules/@mojaloop/sdk-standard-components/node_modules/jsonwebtoken/node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "peer": true, - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/@mojaloop/sdk-standard-components/node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "peer": true, - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, "node_modules/@mongodb-js/saslprep": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.1.tgz", @@ -8290,27 +8233,6 @@ "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", "dev": true }, - "node_modules/jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "peer": true, - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "peer": true, - "dependencies": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" - } - }, "node_modules/kareem": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", diff --git a/package.json b/package.json index af7745b12..f366b9597 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mojaloop/central-ledger", - "version": "17.9.0-iso.1", + "version": "17.9.0-snapshot.1", "description": "Central ledger hosted by a scheme to record and settle transfers", "license": "Apache-2.0", "author": "ModusBox", @@ -88,11 +88,11 @@ "@hapi/inert": "7.1.0", "@hapi/joi": "17.1.1", "@hapi/vision": "7.0.3", - "@mojaloop/central-services-error-handling": "13.0.1", + "@mojaloop/central-services-error-handling": "13.0.2", "@mojaloop/central-services-health": "15.0.0", "@mojaloop/central-services-logger": "11.5.1", "@mojaloop/central-services-metrics": "12.0.8", - "@mojaloop/central-services-shared": "18.10.0", + "@mojaloop/central-services-shared": "18.10.1-snapshot.3", "@mojaloop/central-services-stream": "11.3.1", "@mojaloop/database-lib": "11.0.6", "@mojaloop/event-sdk": "14.1.1", diff --git a/src/domain/position/abort.js b/src/domain/position/abort.js index 6acf6685d..30a342169 100644 --- a/src/domain/position/abort.js +++ b/src/domain/position/abort.js @@ -162,7 +162,8 @@ const _constructAbortResultMessage = (binItem, id, from, notifyTo) => { binItem.message.value.content.headers, // Headers don't really matter here. ml-api-adapter will ignore them and create their own. fspiopError, { id }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) return resultMessage diff --git a/src/domain/position/fulfil.js b/src/domain/position/fulfil.js index d34b71667..55bb73efb 100644 --- a/src/domain/position/fulfil.js +++ b/src/domain/position/fulfil.js @@ -168,7 +168,8 @@ const _handleIncorrectTransferState = (binItem, payeeFsp, transferId, accumulate headers, fspiopError, { id: transferId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) } @@ -197,7 +198,8 @@ const _constructTransferFulfilResultMessage = (binItem, transferId, payerFsp, pa headers, transfer, { id: transferId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) if (binItem.message.value.metadata.event.action === Enum.Events.Event.Action.RESERVE) { @@ -249,7 +251,8 @@ const _constructPatchNotificationResultMessage = (binItem, cyrilResult) => { headers, fulfil, { id: commitRequestId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) messages.push(resultMessage) diff --git a/src/domain/position/fx-fulfil.js b/src/domain/position/fx-fulfil.js index 487302309..8191d85d7 100644 --- a/src/domain/position/fx-fulfil.js +++ b/src/domain/position/fx-fulfil.js @@ -74,7 +74,8 @@ const processPositionFxFulfilBin = async ( headers, fspiopError, { id: commitRequestId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) } else { // forward same headers from the prepare message, except the content-length header @@ -101,7 +102,8 @@ const processPositionFxFulfilBin = async ( headers, fxTransfer, { id: commitRequestId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) // No need to change the transfer state here for success case. diff --git a/src/domain/position/fx-prepare.js b/src/domain/position/fx-prepare.js index f3caf9a46..ded5880d7 100644 --- a/src/domain/position/fx-prepare.js +++ b/src/domain/position/fx-prepare.js @@ -104,7 +104,8 @@ const processFxPositionPrepareBin = async ( headers, fspiopError, { id: fxTransfer.commitRequestId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) binItem.result = { success: false } @@ -146,7 +147,8 @@ const processFxPositionPrepareBin = async ( headers, fspiopError, { id: fxTransfer.commitRequestId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) binItem.result = { success: false } @@ -188,7 +190,8 @@ const processFxPositionPrepareBin = async ( headers, fspiopError, { id: fxTransfer.commitRequestId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) binItem.result = { success: false } @@ -236,7 +239,8 @@ const processFxPositionPrepareBin = async ( headers, fxTransfer, {}, - 'application/json' + 'application/json', + binItem.message.value.content.context ) binItem.result = { success: true } diff --git a/src/domain/position/fx-timeout-reserved.js b/src/domain/position/fx-timeout-reserved.js index 9bda53480..40276c2d2 100644 --- a/src/domain/position/fx-timeout-reserved.js +++ b/src/domain/position/fx-timeout-reserved.js @@ -124,7 +124,8 @@ const _constructFxTimeoutReservedResultMessage = (binItem, commitRequestId, coun binItem.message.value.content.headers, // Headers don't really matter here. ml-api-adapter will ignore them and create their own. fspiopError, { id: commitRequestId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) return resultMessage diff --git a/src/domain/position/prepare.js b/src/domain/position/prepare.js index 5ae3dc883..767e613cf 100644 --- a/src/domain/position/prepare.js +++ b/src/domain/position/prepare.js @@ -105,7 +105,8 @@ const processPositionPrepareBin = async ( headers, fspiopError, { id: transfer.transferId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) binItem.result = { success: false } @@ -147,7 +148,8 @@ const processPositionPrepareBin = async ( headers, fspiopError, { id: transfer.transferId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) binItem.result = { success: false } @@ -189,7 +191,8 @@ const processPositionPrepareBin = async ( headers, fspiopError, { id: transfer.transferId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) binItem.result = { success: false } @@ -238,7 +241,8 @@ const processPositionPrepareBin = async ( headers, transfer, {}, - 'application/json' + 'application/json', + binItem.message.value.content.context ) binItem.result = { success: true } diff --git a/src/domain/position/timeout-reserved.js b/src/domain/position/timeout-reserved.js index 2ec7c0a07..cfb657e22 100644 --- a/src/domain/position/timeout-reserved.js +++ b/src/domain/position/timeout-reserved.js @@ -124,7 +124,8 @@ const _constructTimeoutReservedResultMessage = (binItem, transferId, payeeFsp, p binItem.message.value.content.headers, // Headers don't really matter here. ml-api-adapter will ignore them and create their own. fspiopError, { id: transferId }, - 'application/json' + 'application/json', + binItem.message.value.content.context ) return resultMessage