@mojaloop/central-ledger 17.3.0 → 17.3.1
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [17.3.1](https://github.com/mojaloop/central-ledger/compare/v17.3.0...v17.3.1) (2023-11-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Chore
|
|
9
|
+
|
|
10
|
+
* remove uuid4 ([#976](https://github.com/mojaloop/central-ledger/issues/976)) ([da9dbaf](https://github.com/mojaloop/central-ledger/commit/da9dbafaccc22317609ef278eb0d0bdec6eb938a))
|
|
11
|
+
|
|
5
12
|
## [17.3.0](https://github.com/mojaloop/central-ledger/compare/v17.2.1...v17.3.0) (2023-10-27)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/central-ledger",
|
|
3
|
-
"version": "17.3.
|
|
3
|
+
"version": "17.3.1",
|
|
4
4
|
"description": "Central ledger hosted by a scheme to record and settle transfers",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "ModusBox",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"base64url": "3.0.1",
|
|
102
102
|
"blipp": "4.0.2",
|
|
103
103
|
"commander": "11.1.0",
|
|
104
|
-
"cron": "3.1.
|
|
104
|
+
"cron": "3.1.6",
|
|
105
105
|
"decimal.js": "10.4.3",
|
|
106
106
|
"docdash": "2.0.2",
|
|
107
107
|
"event-stream": "4.0.1",
|
|
@@ -116,8 +116,7 @@
|
|
|
116
116
|
"moment": "2.29.4",
|
|
117
117
|
"mongo-uri-builder": "^4.0.0",
|
|
118
118
|
"rc": "1.2.8",
|
|
119
|
-
"require-glob": "^4.1.0"
|
|
120
|
-
"uuid4": "2.0.3"
|
|
119
|
+
"require-glob": "^4.1.0"
|
|
121
120
|
},
|
|
122
121
|
"optionalDependencies": {
|
|
123
122
|
"mysql": "2.18.1"
|
|
@@ -134,7 +133,7 @@
|
|
|
134
133
|
"pre-commit": "1.2.2",
|
|
135
134
|
"proxyquire": "2.1.3",
|
|
136
135
|
"replace": "^1.2.2",
|
|
137
|
-
"sinon": "
|
|
136
|
+
"sinon": "17.0.0",
|
|
138
137
|
"standard": "17.1.0",
|
|
139
138
|
"standard-version": "^9.5.0",
|
|
140
139
|
"tap-spec": "^5.0.0",
|
|
@@ -39,7 +39,7 @@ const PositionFacade = require('../../models/position/facade')
|
|
|
39
39
|
const Config = require('../../lib/config')
|
|
40
40
|
const Kafka = require('@mojaloop/central-services-shared').Util.Kafka
|
|
41
41
|
const KafkaProducer = require('@mojaloop/central-services-stream').Util.Producer
|
|
42
|
-
const
|
|
42
|
+
const { randomUUID } = require('crypto')
|
|
43
43
|
const Enum = require('@mojaloop/central-services-shared').Enum
|
|
44
44
|
const Enums = require('../../lib/enumCached')
|
|
45
45
|
|
|
@@ -480,7 +480,7 @@ const adjustLimits = async (name, payload) => {
|
|
|
480
480
|
|
|
481
481
|
const createLimitAdjustmentMessageProtocol = (payload, action = Enum.Transfers.AdminNotificationActions.LIMIT_ADJUSTMENT, state = '', pp = '') => {
|
|
482
482
|
return {
|
|
483
|
-
id:
|
|
483
|
+
id: randomUUID(),
|
|
484
484
|
from: payload.name,
|
|
485
485
|
to: Config.HUB_NAME,
|
|
486
486
|
type: 'application/json',
|
|
@@ -490,7 +490,7 @@ const createLimitAdjustmentMessageProtocol = (payload, action = Enum.Transfers.A
|
|
|
490
490
|
},
|
|
491
491
|
metadata: {
|
|
492
492
|
event: {
|
|
493
|
-
id:
|
|
493
|
+
id: randomUUID(),
|
|
494
494
|
responseTo: '',
|
|
495
495
|
type: 'notification',
|
|
496
496
|
action,
|
|
@@ -653,7 +653,7 @@ const createRecordFundsMessageProtocol = (payload, action = '', state = '', pp =
|
|
|
653
653
|
},
|
|
654
654
|
metadata: {
|
|
655
655
|
event: {
|
|
656
|
-
id:
|
|
656
|
+
id: randomUUID(),
|
|
657
657
|
responseTo: '',
|
|
658
658
|
type: 'transfer',
|
|
659
659
|
action,
|
|
@@ -51,7 +51,7 @@ const Consumer = require('@mojaloop/central-services-stream').Util.Consumer
|
|
|
51
51
|
const Enum = require('@mojaloop/central-services-shared').Enum
|
|
52
52
|
const Metrics = require('@mojaloop/central-services-metrics')
|
|
53
53
|
const Config = require('../../lib/config')
|
|
54
|
-
const
|
|
54
|
+
const { randomUUID } = require('crypto')
|
|
55
55
|
const decodePayload = require('@mojaloop/central-services-shared').Util.StreamingProtocol.decodePayload
|
|
56
56
|
const decodeMessages = require('@mojaloop/central-services-shared').Util.StreamingProtocol.decodeMessages
|
|
57
57
|
const ErrorHandler = require('@mojaloop/central-services-error-handling')
|
|
@@ -274,7 +274,7 @@ const registerPositionHandler = async () => {
|
|
|
274
274
|
topicName: Kafka.transformGeneralTopicName(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, Enum.Events.Event.Type.POSITION, Enum.Events.Event.Action.PREPARE),
|
|
275
275
|
config: Kafka.getKafkaConfig(Config.KAFKA_CONFIG, Enum.Kafka.Config.CONSUMER, Enum.Events.Event.Type.TRANSFER.toUpperCase(), Enum.Events.Event.Action.POSITION.toUpperCase())
|
|
276
276
|
}
|
|
277
|
-
positionHandler.config.rdkafkaConf['client.id'] = `${positionHandler.config.rdkafkaConf['client.id']}-${
|
|
277
|
+
positionHandler.config.rdkafkaConf['client.id'] = `${positionHandler.config.rdkafkaConf['client.id']}-${randomUUID()}`
|
|
278
278
|
await Consumer.createHandler(positionHandler.topicName, positionHandler.config, positionHandler.command)
|
|
279
279
|
return true
|
|
280
280
|
} catch (err) {
|
package/src/shared/setup.js
CHANGED
|
@@ -40,7 +40,7 @@ const ObjStoreDb = require('@mojaloop/object-store-lib').Db
|
|
|
40
40
|
const Plugins = require('./plugins')
|
|
41
41
|
const Config = require('../lib/config')
|
|
42
42
|
const RequestLogger = require('../lib/requestLogger')
|
|
43
|
-
const
|
|
43
|
+
const { randomUUID } = require('crypto')
|
|
44
44
|
const UrlParser = require('../lib/urlParser')
|
|
45
45
|
const Logger = require('@mojaloop/central-services-logger')
|
|
46
46
|
const RegisterHandlers = require('../handlers/register')
|
|
@@ -115,7 +115,7 @@ const createServer = (port, modules) => {
|
|
|
115
115
|
})
|
|
116
116
|
server.ext('onPostAuth', function (request, h) {
|
|
117
117
|
const transferId = UrlParser.idFromTransferUri(`${Config.HOSTNAME}${request.path}`)
|
|
118
|
-
request.headers.traceid = request.headers.traceid || transferId ||
|
|
118
|
+
request.headers.traceid = request.headers.traceid || transferId || randomUUID()
|
|
119
119
|
RequestLogger.logRequest(request)
|
|
120
120
|
return h.continue
|
|
121
121
|
})
|