account-lookup-service 17.14.5-cache.1 → 17.14.5-cache.3

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/audit-ci.jsonc CHANGED
@@ -5,7 +5,6 @@
5
5
  "moderate": true,
6
6
  // NOTE: Please add as much information as possible to any items added to the allowList
7
7
  "allowlist": [
8
- "GHSA-4hjh-wcwx-xvwj", // todo: update axios - https://github.com/advisories/GHSA-4hjh-wcwx-xvwj
9
8
  "GHSA-9965-vmph-33xx", // originates from dev dependency swagmock
10
9
  "GHSA-vghf-hv5q-vc2g" // originates from dev dependency swagmock
11
10
  ]
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.5-cache.1",
4
+ "version": "17.14.5-cache.3",
5
5
  "license": "Apache-2.0",
6
6
  "author": "ModusBox",
7
7
  "contributors": [
@@ -156,7 +156,7 @@ module.exports = {
156
156
  payload
157
157
  }, EventSdk.AuditEventAction.start)
158
158
 
159
- participants.postParticipants(request.headers, request.method, request.params, request.payload, request.span, request).catch(err => {
159
+ participants.postParticipants(request.headers, request.method, request.params, request.payload, request.span).catch(err => {
160
160
  request.server.log(['error'], `ERROR - postParticipants: ${LibUtil.getStackOrInspect(err)}`)
161
161
  })
162
162
  histTimerEnd({ success: true })
package/src/lib/cache.js CHANGED
@@ -41,16 +41,11 @@ class CacheClient {
41
41
  }
42
42
 
43
43
  async initCache (catboxMemoryClient) {
44
- if (catboxMemoryClient) {
45
- this.policy = new Catbox.Policy({
46
- generateFunc: this.generateFunc,
47
- expiresIn,
48
- generateTimeout: false
49
- },
50
- catboxMemoryClient,
51
- this.segment
52
- )
53
- }
44
+ this.policy = new Catbox.Policy({
45
+ generateFunc: this.generateFunc,
46
+ expiresIn,
47
+ generateTimeout: false
48
+ }, catboxMemoryClient, this.segment)
54
49
  return await this.preloadCache?.()
55
50
  }
56
51
 
@@ -89,7 +84,7 @@ const initCache = async function () {
89
84
  }
90
85
 
91
86
  const destroyCache = async function () {
92
- catboxMemoryClient?.stop()
87
+ await catboxMemoryClient?.stop()
93
88
  }
94
89
 
95
90
  const dropClients = function () {
@@ -159,7 +159,7 @@ const sendOracleGetRequest = async ({
159
159
  })).data
160
160
 
161
161
  histTimerEnd({ success: true })
162
- return response
162
+ return { data: response }
163
163
  } catch (err) {
164
164
  log.warn('error in sendOracleGetRequest: ', err)
165
165
  histTimerEnd({ success: false })