@mojaloop/sdk-scheme-adapter 24.9.8-snapshot.10 → 24.9.8-snapshot.11

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-api-svc",
3
- "version": "21.0.0-snapshot.48",
3
+ "version": "21.0.0-snapshot.49",
4
4
  "description": "An adapter for connecting to Mojaloop API enabled switches.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -69,6 +69,8 @@ class Server extends EventEmitter {
69
69
  this.conf = conf;
70
70
  this.logger = logger;
71
71
  this.cache = createCache(conf);
72
+ this.peerJWSKeys = _.cloneDeep(conf?.peerJWSKeys);
73
+ this.jwsSigningKey = _.cloneDeep(conf?.jwsSigningKey);
72
74
 
73
75
  this.metricsClient = new MetricsClient();
74
76
  this.metricsServer = new MetricsServer({
@@ -142,8 +144,8 @@ class Server extends EventEmitter {
142
144
  _shouldUpdateInboundServer(newConf) {
143
145
  const isInboundDifferent = !_.isEqual(this.conf.inbound, newConf.inbound);
144
146
  const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
145
- const isPeerJWSKeysDifferent = !_.isEqual(this.conf.peerJWSKeys, newConf.peerJWSKeys);
146
- const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
147
+ const isPeerJWSKeysDifferent = !_.isEqual(this.peerJWSKeys, newConf.peerJWSKeys);
148
+ const isJwsSigningKeyDifferent = !_.isEqual(this.jwsSigningKey, newConf.jwsSigningKey);
147
149
 
148
150
  if (isInboundDifferent) {
149
151
  this.logger.debug('Inbound config is different', {
@@ -160,7 +162,7 @@ class Server extends EventEmitter {
160
162
 
161
163
  if (isPeerJWSKeysDifferent) {
162
164
  this.logger.debug('Peer JWS Keys config is different', {
163
- oldPeerJWSKeys: this.conf.peerJWSKeys,
165
+ oldPeerJWSKeys: this.peerJWSKeys,
164
166
  newPeerJWSKeys: newConf.peerJWSKeys
165
167
  });
166
168
  }
@@ -177,7 +179,7 @@ class Server extends EventEmitter {
177
179
 
178
180
  _shouldUpdateOutboundServer(newConf) {
179
181
  const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
180
- const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
182
+ const isJwsSigningKeyDifferent = !_.isEqual(this.jwsSigningKey, newConf.jwsSigningKey);
181
183
 
182
184
  if (isOutboundDifferent) {
183
185
  this.logger.debug('Outbound config is different', {
@@ -188,7 +190,7 @@ class Server extends EventEmitter {
188
190
 
189
191
  if (isJwsSigningKeyDifferent) {
190
192
  this.logger.debug('JWS Signing Key config is different', {
191
- oldJwsSigningKey: this.conf.jwsSigningKey,
193
+ oldJwsSigningKey: this.jwsSigningKey,
192
194
  newJwsSigningKey: newConf.jwsSigningKey
193
195
  });
194
196
  }
@@ -419,7 +421,9 @@ class Server extends EventEmitter {
419
421
  }
420
422
  }
421
423
 
422
- this.conf = _.cloneDeep(newConf);
424
+ this.conf = newConf;
425
+ this.peerJWSKeys = _.cloneDeep(newConf.peerJWSKeys);
426
+ this.jwsSigningKey = _.cloneDeep(newConf.jwsSigningKey);
423
427
 
424
428
  await oldCache?.disconnect();
425
429
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
3
- "version": "0.3.0-snapshot.45",
3
+ "version": "0.3.0-snapshot.46",
4
4
  "description": "Mojaloop sdk scheme adapter command event handler",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter/",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-outbound-domain-event-handler",
3
- "version": "0.3.0-snapshot.45",
3
+ "version": "0.3.0-snapshot.46",
4
4
  "description": "mojaloop sdk scheme adapter outbound domain event handler",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter/",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-private-shared-lib",
3
- "version": "0.4.0-snapshot.45",
3
+ "version": "0.4.0-snapshot.46",
4
4
  "description": "SDK Scheme Adapter private shared library.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/accounts-and-balances-bc/tree/main/modules/private-types",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter",
3
- "version": "24.9.8-snapshot.10",
3
+ "version": "24.9.8-snapshot.11",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",