@mojaloop/sdk-scheme-adapter 24.9.8-snapshot.3 → 24.9.8-snapshot.4

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.41",
3
+ "version": "21.0.0-snapshot.42",
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",
@@ -142,7 +142,6 @@ class Server extends EventEmitter {
142
142
  _shouldUpdateInboundServer(newConf) {
143
143
  const isInboundDifferent = !_.isEqual(this.conf.inbound, newConf.inbound);
144
144
  const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
145
- const isPeerJWSKeysDifferent = !_.isEqual(this.conf.peerJWSKeys, newConf.peerJWSKeys);
146
145
 
147
146
  if (isInboundDifferent) {
148
147
  this.logger.debug('Inbound config is different', {
@@ -156,19 +155,12 @@ class Server extends EventEmitter {
156
155
  newOutbound: newConf.outbound
157
156
  });
158
157
  }
159
- if (isPeerJWSKeysDifferent) {
160
- this.logger.debug('Peer JWS Keys config is different', {
161
- oldPeerJWSKeys: this.conf.peerJWSKeys,
162
- newPeerJWSKeys: newConf.peerJWSKeys
163
- });
164
- }
165
158
 
166
- return isInboundDifferent || isOutboundDifferent || isPeerJWSKeysDifferent;
159
+ return isInboundDifferent || isOutboundDifferent;
167
160
  }
168
161
 
169
162
  _shouldUpdateOutboundServer(newConf) {
170
163
  const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
171
- const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
172
164
 
173
165
  if (isOutboundDifferent) {
174
166
  this.logger.debug('Outbound config is different', {
@@ -176,14 +168,8 @@ class Server extends EventEmitter {
176
168
  newOutbound: newConf.outbound
177
169
  });
178
170
  }
179
- if (isJwsSigningKeyDifferent) {
180
- this.logger.debug('JWS signing key is different', {
181
- oldJwsSigningKey: this.conf.jwsSigningKey,
182
- newJwsSigningKey: newConf.jwsSigningKey
183
- });
184
- }
185
171
 
186
- return isOutboundDifferent || isJwsSigningKeyDifferent;
172
+ return isOutboundDifferent;
187
173
  }
188
174
 
189
175
  async start() {
@@ -309,6 +295,20 @@ class Server extends EventEmitter {
309
295
  restartActionsTaken.updateOutboundServer = true;
310
296
  }
311
297
 
298
+ if(!_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey) ||
299
+ !_.isEqual(this.conf.peerJWSKeys, newConf.peerJWSKeys)) {
300
+ this.logger.isDebugEnabled && this.logger.push({
301
+ oldJwsSigningKey: this.conf.jwsSigningKey,
302
+ newJwsSigningKey: newConf.jwsSigningKey,
303
+ oldPeerJWSKeys: this.conf.peerJWSKeys,
304
+ newPeerJWSKeys: newConf.peerJWSKeys
305
+ }).debug('JWS signing key or peer JWS keys configuration changed');
306
+ this.outboundServer._conf.jwsSigningKey = newConf.jwsSigningKey;
307
+ this.outboundServer._conf.peerJWSKeys = newConf.peerJWSKeys;
308
+ this.inboundServer._conf.jwsSigningKey = newConf.jwsSigningKey;
309
+ this.inboundServer._conf.peerJWSKeys = newConf.peerJWSKeys;
310
+ }
311
+
312
312
  const updateFspiopEventHandler = !_.isEqual(this.conf.outbound, newConf.outbound)
313
313
  && this.conf.fspiopEventHandler.enabled;
314
314
  if (updateFspiopEventHandler) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
3
- "version": "0.3.0-snapshot.38",
3
+ "version": "0.3.0-snapshot.39",
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.38",
3
+ "version": "0.3.0-snapshot.39",
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.38",
3
+ "version": "0.4.0-snapshot.39",
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.3",
3
+ "version": "24.9.8-snapshot.4",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",