account-lookup-service 17.14.0-snapshot.4 → 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.
- package/package.json +3 -3
- package/src/domain/parties/services/PutPartiesErrorService.js +5 -5
- package/src/domain/parties/services/TimeoutPartiesService.js +2 -0
- package/src/models/oracle/facade.js +1 -1
- package/test/integration/api/parties.test.js +0 -4
- package/test/unit/domain/parties/services/TimeoutPartiesService.test.js +3 -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.
|
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.
|
99
|
-
"@mojaloop/central-services-stream": "11.8.
|
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
|
39
|
-
if (!
|
40
|
-
this.log.verbose('proxy error callback was processed
|
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()
|
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)
|
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.
|
129
|
+
logger.debug(`Oracle endpoint: ${url}`, { currency, params, partySubIdOrType, url })
|
130
130
|
return url
|
131
131
|
}
|
132
132
|
|
@@ -50,7 +50,9 @@ describe('TimeoutPartiesService Tests -->', () => {
|
|
50
50
|
|
51
51
|
await service.handleExpiredKey()
|
52
52
|
expect(participantMock.sendErrorToParticipant).toHaveBeenCalledTimes(1)
|
53
|
-
|
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 () => {
|