@mojaloop/sdk-scheme-adapter 24.11.0-snapshot.0 → 24.11.0-snapshot.2

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.58",
3
+ "version": "21.0.0-snapshot.60",
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",
@@ -504,6 +504,7 @@ class InboundTransfersModel {
504
504
 
505
505
  setTimeout(async () => {
506
506
  try {
507
+ this._logger.isInfoEnabled && this._logger.push({ transferId }).info('Patch notification grace time expired, attempting GET /transfers/{ID}');
507
508
  const notified = await this._cache.get(cacheKey);
508
509
 
509
510
  if (!notified) {
@@ -529,7 +530,7 @@ class InboundTransfersModel {
529
530
  // Mark as notified to prevent duplicate notification
530
531
  await this._cache.set(cacheKey, true, 60);
531
532
  // Send notification to payee
532
- await this.sendNotificationToPayee(message.data, transferId);
533
+ await this.sendNotificationToPayee(message.data.body, transferId);
533
534
  break;
534
535
  }
535
536
  } catch (err) {
@@ -1056,11 +1057,11 @@ class InboundTransfersModel {
1056
1057
  operation.attempt(async (currentAttempt) => {
1057
1058
  try {
1058
1059
  res = await this._backendRequests.putFxTransfersNotification(responseBody, conversionId);
1059
- if ((res && (res.status === 200 || res.statusCode === 200)) || res === true) {
1060
+ if (res) {
1060
1061
  return resolve();
1061
1062
  }
1062
- log.warn(`putFxTransfersNotification attempt ${currentAttempt} failed, retrying...`);
1063
- if (!operation.retry(new Error('Non-200 response'))) {
1063
+ log.warn(`putFxTransfersNotification attempt ${currentAttempt} got no response, retrying...`);
1064
+ if (!operation.retry(new Error('No response'))) {
1064
1065
  resolve();
1065
1066
  }
1066
1067
  } catch (err) {
@@ -1072,12 +1073,12 @@ class InboundTransfersModel {
1072
1073
  });
1073
1074
  });
1074
1075
 
1075
- if ((res && (res.status !== 200 && res.statusCode !== 200)) && res !== true) {
1076
+ if (!res) {
1076
1077
  log.error(`putFxTransfersNotification failed after ${operation.attempts()} attempts`);
1077
1078
  }
1078
1079
  } else {
1079
1080
  res = await this._backendRequests.putFxTransfersNotification(responseBody, conversionId);
1080
- if ((res && (res.status !== 200 && res.statusCode !== 200)) && res !== true) {
1081
+ if (!res) {
1081
1082
  log.error('putFxTransfersNotification failed');
1082
1083
  }
1083
1084
  }
@@ -1139,13 +1140,13 @@ class InboundTransfersModel {
1139
1140
  operation.attempt(async (currentAttempt) => {
1140
1141
  try {
1141
1142
  res = await this._backendRequests.putTransfersNotification(this.data, transferId);
1142
- if ((res && (res.status === 200 || res.statusCode === 200)) || res === true) {
1143
+ if (res) {
1143
1144
  const cacheKey = `patchNotificationSent_${transferId}`;
1144
1145
  await this._cache.set(cacheKey, true, 60);
1145
1146
  return resolve();
1146
1147
  }
1147
- this._logger.warn(`putTransfersNotification attempt ${currentAttempt} failed, retrying...`);
1148
- if (!operation.retry(new Error('Non-200 response'))) {
1148
+ this._logger.warn(`putTransfersNotification attempt ${currentAttempt} got no response, retrying...`);
1149
+ if (!operation.retry(new Error('No response'))) {
1149
1150
  resolve();
1150
1151
  }
1151
1152
  } catch (err) {
@@ -1157,12 +1158,12 @@ class InboundTransfersModel {
1157
1158
  });
1158
1159
  });
1159
1160
 
1160
- if ((res && (res.status !== 200 && res.statusCode !== 200)) && res !== true) {
1161
+ if (!res) {
1161
1162
  this._logger.error(`putTransfersNotification failed after ${operation.attempts()} attempts`);
1162
1163
  }
1163
1164
  } else {
1164
1165
  res = await this._backendRequests.putTransfersNotification(this.data, transferId);
1165
- if ((res && (res.status !== 200 && res.statusCode !== 200)) && res !== true) {
1166
+ if (!res) {
1166
1167
  this._logger.error('putTransfersNotification failed');
1167
1168
  }
1168
1169
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
3
- "version": "0.3.0-snapshot.54",
3
+ "version": "0.3.0-snapshot.56",
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.54",
3
+ "version": "0.3.0-snapshot.56",
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.54",
3
+ "version": "0.4.0-snapshot.56",
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.11.0-snapshot.0",
3
+ "version": "24.11.0-snapshot.2",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",