account-lookup-service 17.14.0-snapshot.3 → 17.14.0-snapshot.5

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.
@@ -52,14 +52,14 @@
52
52
  "getDecoratedValue": true
53
53
  },
54
54
  "CENTRAL_SHARED_PARTICIPANT_CACHE_CONFIG": {
55
- "expiresIn": 61000,
55
+ "expiresIn": 3000,
56
56
  "generateTimeout": 30000,
57
57
  "getDecoratedValue": true
58
58
  },
59
59
  "GENERAL_CACHE_CONFIG": {
60
60
  "CACHE_ENABLED": false,
61
61
  "MAX_BYTE_SIZE": 10000000,
62
- "EXPIRES_IN_MS": 61000
62
+ "EXPIRES_IN_MS": 3000
63
63
  },
64
64
  "PROXY_CACHE": {
65
65
  "enabled": true,
@@ -51,14 +51,14 @@
51
51
  "getDecoratedValue": true
52
52
  },
53
53
  "CENTRAL_SHARED_PARTICIPANT_CACHE_CONFIG": {
54
- "expiresIn": 61000,
54
+ "expiresIn": 3000,
55
55
  "generateTimeout": 30000,
56
56
  "getDecoratedValue": true
57
57
  },
58
58
  "GENERAL_CACHE_CONFIG": {
59
59
  "CACHE_ENABLED": false,
60
60
  "MAX_BYTE_SIZE": 10000000,
61
- "EXPIRES_IN_MS": 61000
61
+ "EXPIRES_IN_MS": 3000
62
62
  },
63
63
  "PROXY_CACHE": {
64
64
  "enabled": true,
@@ -7,7 +7,7 @@ module.exports = {
7
7
  GENERAL_CACHE_CONFIG: {
8
8
  CACHE_ENABLED: true,
9
9
  MAX_BYTE_SIZE: 10000000,
10
- EXPIRES_IN_MS: 61000
10
+ EXPIRES_IN_MS: 3000
11
11
  },
12
12
  CENTRAL_SHARED_PARTICIPANT_CACHE_CONFIG: {
13
13
  expiresIn: 1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "account-lookup-service",
3
3
  "description": "Account Lookup Service is used to validate Party and Participant lookups.",
4
- "version": "17.14.0-snapshot.3",
4
+ "version": "17.14.0-snapshot.5",
5
5
  "license": "Apache-2.0",
6
6
  "author": "ModusBox",
7
7
  "contributors": [
@@ -95,8 +95,8 @@
95
95
  "@mojaloop/central-services-health": "15.1.0",
96
96
  "@mojaloop/central-services-logger": "11.10.1",
97
97
  "@mojaloop/central-services-metrics": "12.7.1",
98
- "@mojaloop/central-services-shared": "18.33.3",
99
- "@mojaloop/central-services-stream": "11.8.7",
98
+ "@mojaloop/central-services-shared": "18.33.4",
99
+ "@mojaloop/central-services-stream": "11.8.8",
100
100
  "@mojaloop/database-lib": "^11.3.2",
101
101
  "@mojaloop/event-sdk": "14.7.0",
102
102
  "@mojaloop/inter-scheme-proxy-cache-lib": "2.7.0-snapshot.2",
@@ -35,17 +35,17 @@ class PutPartiesErrorService extends BasePartiesService {
35
35
  this.log.verbose(`isInterSchemeDiscoveryCase: ${isInterSchemeDiscoveryCase}`, this.state)
36
36
 
37
37
  if (isInterSchemeDiscoveryCase) {
38
- const isLast = await this.checkLastProxyCallback(alsReq)
39
- if (!isLast) {
40
- this.log.verbose('proxy error callback was processed (not last)')
38
+ const isLastAndNoSuccess = await this.checkLastProxyCallback(alsReq)
39
+ if (!isLastAndNoSuccess) {
40
+ this.log.verbose('proxy error callback was processed - not last OR has success, skip forwarding')
41
41
  return
42
42
  }
43
43
  } else {
44
- const isExternal = await this.#isPartyFromExternalDfsp() // !!! DO not clear oracle for the error callback for the same inter-scheme discovery flow
44
+ const isExternal = await this.#isPartyFromExternalDfsp()
45
45
  if (isExternal) {
46
46
  this.log.info('need to cleanup oracle coz party is from external DFSP')
47
47
  await this.cleanupOracle()
48
- await this.removeProxyGetPartiesTimeoutCache(alsReq) // todo: think if we need this
48
+ await this.removeProxyGetPartiesTimeoutCache(alsReq)
49
49
  }
50
50
  }
51
51
  }
@@ -58,6 +58,8 @@ class TimeoutPartiesService extends PutPartiesErrorService {
58
58
 
59
59
  async prepareErrorInformation () {
60
60
  const { headers, params } = this.inputs
61
+ headers.date = new Date().toUTCString()
62
+
61
63
  const error = TimeoutPartiesService.createFSPIOPExpiredError()
62
64
  const errorInfo = await this.deps.partiesUtils.makePutPartiesErrorPayload(
63
65
  this.deps.config, error, headers, params
@@ -126,7 +126,7 @@ const determineOracleEndpoint = async ({
126
126
  url = await _getOracleEndpointByType(partyIdType, partyIdentifier, assertPendingAcquire)
127
127
  }
128
128
 
129
- logger.verbose(`Oracle endpoint: ${url}`, { currency, params, partySubIdOrType, url })
129
+ logger.debug(`Oracle endpoint: ${url}`, { currency, params, partySubIdOrType, url })
130
130
  return url
131
131
  }
132
132
 
@@ -43,10 +43,6 @@ describe('Parties Endpoints Tests -->', () => {
43
43
  await proxyCache.connect()
44
44
  })
45
45
 
46
- // beforeEach(async () => {
47
- // await proxyCache.redisClient.flushdb()
48
- // })
49
-
50
46
  afterAll(async () => {
51
47
  await proxyCache.disconnect()
52
48
  })
@@ -50,7 +50,9 @@ describe('TimeoutPartiesService Tests -->', () => {
50
50
 
51
51
  await service.handleExpiredKey()
52
52
  expect(participantMock.sendErrorToParticipant).toHaveBeenCalledTimes(1)
53
- expect(participantMock.sendErrorToParticipant.mock.lastCall[0]).toBe(proxy)
53
+ const [sendTo, , , cbHeaders] = participantMock.sendErrorToParticipant.mock.lastCall
54
+ expect(sendTo).toBe(proxy)
55
+ expect(cbHeaders.date).toBeDefined()
54
56
  })
55
57
 
56
58
  test('should send error callback in ISO20022 format', async () => {