Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: inconsistent completedTimestamp #1141

Merged
merged 18 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ devspace*
*IGNORE*
*ignore*
!.npmignore

.rush
128 changes: 41 additions & 87 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,13 @@
"@hapi/good": "9.0.1",
"@hapi/hapi": "21.3.12",
"@hapi/inert": "7.1.0",
"@hapi/joi": "17.1.1",
"@hapi/vision": "7.0.3",
"@mojaloop/central-services-error-handling": "13.0.2",
"@mojaloop/central-services-error-handling": "13.0.3",
"@mojaloop/central-services-health": "15.0.0",
"@mojaloop/central-services-logger": "11.5.1",
"@mojaloop/central-services-metrics": "12.4.2",
"@mojaloop/central-services-shared": "18.15.0",
"@mojaloop/central-services-stream": "11.4.1",
"@mojaloop/central-services-metrics": "12.4.3",
"@mojaloop/central-services-shared": "18.15.1",
"@mojaloop/central-services-stream": "11.4.2",
"@mojaloop/database-lib": "11.1.0",
"@mojaloop/event-sdk": "14.1.1",
"@mojaloop/inter-scheme-proxy-cache-lib": "2.3.1",
Expand All @@ -115,6 +114,7 @@
"hapi-auth-bearer-token": "8.0.0",
"hapi-swagger": "17.3.2",
"ilp-packet": "2.2.0",
"joi": "17.13.3",
"knex": "3.1.0",
"lodash": "4.17.21",
"moment": "2.30.1",
Expand Down
2 changes: 1 addition & 1 deletion src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const MetricsPlugin = require('@mojaloop/central-services-metrics').plugin
module.exports = Setup.initialize({
service: 'api',
port: Config.PORT,
modules: [Routes, MetricsPlugin],
modules: [Routes, !Config.INSTRUMENTATION_METRICS_DISABLED && MetricsPlugin].filter(Boolean),
runMigrations: Config.RUN_MIGRATIONS,
runHandlers: !Config.HANDLERS_DISABLED
})
2 changes: 1 addition & 1 deletion src/api/ledgerAccountTypes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'use strict'

const Handler = require('./handler')
const Joi = require('@hapi/joi')
const Joi = require('joi')
const tags = ['api', 'ledgerAccountTypes']

module.exports = [
Expand Down
3 changes: 2 additions & 1 deletion src/lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
******/
'use strict'

module.exports = require('@mojaloop/database-lib').Db
const Database = require('@mojaloop/database-lib/src/database')
module.exports = new Database()
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const { randomUUID } = require('crypto')
const Logger = require('@mojaloop/central-services-logger')
const Config = require('#src/lib/config')
const ProxyCache = require('#src/lib/proxyCache')
const Db = require('@mojaloop/database-lib').Db
const Db = require('../../../../src/lib/db')
const Cache = require('#src/lib/cache')
const { Producer, Consumer } = require('@mojaloop/central-services-stream').Util
const Utility = require('@mojaloop/central-services-shared').Util.Kafka
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Test = require('tape')
const { randomUUID } = require('crypto')
const Logger = require('@mojaloop/central-services-logger')
const Config = require('#src/lib/config')
const Db = require('@mojaloop/database-lib').Db
const Db = require('../../../../src/lib/db')
const Cache = require('#src/lib/cache')
const ProxyCache = require('#src/lib/proxyCache')
const Producer = require('@mojaloop/central-services-stream').Util.Producer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
**********/

const Test = require('tape')
const { Db } = require('@mojaloop/database-lib')
const Db = require('../../../../src/lib/db')
const { Enum, Util } = require('@mojaloop/central-services-shared')
const { Producer } = require('@mojaloop/central-services-stream').Kafka

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Test = require('tape')
const { randomUUID } = require('crypto')
const Logger = require('@mojaloop/central-services-logger')
const Config = require('#src/lib/config')
const Db = require('@mojaloop/database-lib').Db
const Db = require('../../../../src/lib/db')
const Cache = require('#src/lib/cache')
const ProxyCache = require('#src/lib/proxyCache')
const Producer = require('@mojaloop/central-services-stream').Util.Producer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Test = require('tape')
const { randomUUID } = require('crypto')
const Logger = require('@mojaloop/central-services-logger')
const Config = require('#src/lib/config')
const Db = require('@mojaloop/database-lib').Db
const Db = require('../../../../src/lib/db')
const Cache = require('#src/lib/cache')
const ProxyCache = require('#src/lib/proxyCache')
const Producer = require('@mojaloop/central-services-stream').Util.Producer
Expand Down
2 changes: 1 addition & 1 deletion test/integration/handlers/root.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
const Test = require('tape')
const Joi = require('joi')
const Logger = require('@mojaloop/central-services-logger')
const Db = require('@mojaloop/database-lib').Db
const Db = require('../../../src/lib/db')

const Config = require('../../../src/lib/config')
const ProxyCache = require('../../../src/lib/proxyCache')
Expand Down
2 changes: 1 addition & 1 deletion test/integration/handlers/transfers/handlers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Logger = require('@mojaloop/central-services-logger')
const Config = require('#src/lib/config')
const ProxyCache = require('#src/lib/proxyCache')
const Time = require('@mojaloop/central-services-shared').Util.Time
const Db = require('@mojaloop/database-lib').Db
const Db = require('../../../../src/lib/db')
const Cache = require('#src/lib/cache')
const Producer = require('@mojaloop/central-services-stream').Util.Producer
const Utility = require('@mojaloop/central-services-shared').Util.Kafka
Expand Down
2 changes: 1 addition & 1 deletion test/integration/helpers/settlementModels.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
const Model = require('../../../src/domain/settlement')
const Enums = require('../../../src/lib/enumCached')
const ErrorHandler = require('@mojaloop/central-services-error-handling')
const Db = require('@mojaloop/database-lib').Db
const Db = require('../../../src/lib/db')
const Cache = require('../../../src/lib/cache')
const ProxyCache = require('../../../src/lib/proxyCache')
const ParticipantCached = require('../../../src/models/participant/participantCached')
Expand Down
2 changes: 1 addition & 1 deletion test/unit/handlers/transfers/FxFulfilService.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/* eslint-disable object-property-newline */
const Sinon = require('sinon')
const Test = require('tapes')(require('tape'))
const { Db } = require('@mojaloop/database-lib')
const Db = require('../../../../src/lib/db')
const { Enum, Util } = require('@mojaloop/central-services-shared')
const { Consumer, Producer } = require('@mojaloop/central-services-stream').Util

Expand Down