@mojaloop/sdk-scheme-adapter 24.11.0-snapshot.2 → 24.11.0-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.
- package/.yarn/cache/{@mojaloop-central-services-shared-npm-18.33.0-eee3a0674c-98d4f0e2ce.zip → @mojaloop-central-services-shared-npm-18.33.2-ae721deeeb-a80777e9e9.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/modules/api-svc/package.json +2 -2
- package/modules/api-svc/src/lib/model/InboundTransfersModel.js +21 -31
- package/modules/outbound-command-event-handler/package.json +2 -2
- package/modules/outbound-domain-event-handler/package.json +1 -1
- package/modules/private-shared-lib/package.json +2 -2
- package/package.json +1 -1
|
Binary file
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-api-svc",
|
|
3
|
-
"version": "21.0.0-snapshot.
|
|
3
|
+
"version": "21.0.0-snapshot.62",
|
|
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",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@mojaloop/central-services-error-handling": "13.1.2",
|
|
69
69
|
"@mojaloop/central-services-logger": "11.9.3",
|
|
70
70
|
"@mojaloop/central-services-metrics": "12.7.1",
|
|
71
|
-
"@mojaloop/central-services-shared": "18.33.
|
|
71
|
+
"@mojaloop/central-services-shared": "18.33.2",
|
|
72
72
|
"@mojaloop/event-sdk": "14.7.0",
|
|
73
73
|
"@mojaloop/logging-bc-client-lib": "0.5.8",
|
|
74
74
|
"@mojaloop/ml-schema-transformer-lib": "2.7.8",
|
|
@@ -1042,8 +1042,8 @@ class InboundTransfersModel {
|
|
|
1042
1042
|
log.verbose('sendFxPutNotificationToBackend body sent to cc: ', { responseBody });
|
|
1043
1043
|
|
|
1044
1044
|
const { enabled, maxRetries, retryDelayMs, maxRetryDelayMs, backoffFactor } = this._backendRequestRetry || {};
|
|
1045
|
-
let res;
|
|
1046
1045
|
const shouldRetry = enabled !== false; // default to true if not set
|
|
1046
|
+
let res;
|
|
1047
1047
|
|
|
1048
1048
|
if (shouldRetry) {
|
|
1049
1049
|
const operation = retry.operation({
|
|
@@ -1057,13 +1057,10 @@ class InboundTransfersModel {
|
|
|
1057
1057
|
operation.attempt(async (currentAttempt) => {
|
|
1058
1058
|
try {
|
|
1059
1059
|
res = await this._backendRequests.putFxTransfersNotification(responseBody, conversionId);
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
if (!operation.retry(new Error('No response'))) {
|
|
1065
|
-
resolve();
|
|
1066
|
-
}
|
|
1060
|
+
// Consider success as long as it doesn't throw
|
|
1061
|
+
// `sendRequest` only seems to return `data` of the request which could
|
|
1062
|
+
// be empty for a 200 response
|
|
1063
|
+
return resolve();
|
|
1067
1064
|
} catch (err) {
|
|
1068
1065
|
log.warn(`putFxTransfersNotification attempt ${currentAttempt} threw error, retrying...`, err);
|
|
1069
1066
|
if (!operation.retry(err)) {
|
|
@@ -1072,14 +1069,11 @@ class InboundTransfersModel {
|
|
|
1072
1069
|
}
|
|
1073
1070
|
});
|
|
1074
1071
|
});
|
|
1075
|
-
|
|
1076
|
-
if (!res) {
|
|
1077
|
-
log.error(`putFxTransfersNotification failed after ${operation.attempts()} attempts`);
|
|
1078
|
-
}
|
|
1079
1072
|
} else {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1073
|
+
try {
|
|
1074
|
+
res = await this._backendRequests.putFxTransfersNotification(responseBody, conversionId);
|
|
1075
|
+
} catch (err) {
|
|
1076
|
+
log.error('putFxTransfersNotification failed', err);
|
|
1083
1077
|
}
|
|
1084
1078
|
}
|
|
1085
1079
|
return res;
|
|
@@ -1140,15 +1134,12 @@ class InboundTransfersModel {
|
|
|
1140
1134
|
operation.attempt(async (currentAttempt) => {
|
|
1141
1135
|
try {
|
|
1142
1136
|
res = await this._backendRequests.putTransfersNotification(this.data, transferId);
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
if (!operation.retry(new Error('No response'))) {
|
|
1150
|
-
resolve();
|
|
1151
|
-
}
|
|
1137
|
+
// Consider success as long as it doesn't throw
|
|
1138
|
+
// `sendRequest` only seems to return `data` of the request which could
|
|
1139
|
+
// be empty for a 200 response
|
|
1140
|
+
const cacheKey = `patchNotificationSent_${transferId}`;
|
|
1141
|
+
await this._cache.set(cacheKey, true, 60);
|
|
1142
|
+
return resolve();
|
|
1152
1143
|
} catch (err) {
|
|
1153
1144
|
this._logger.warn(`putTransfersNotification attempt ${currentAttempt} threw error, retrying...`, err);
|
|
1154
1145
|
if (!operation.retry(err)) {
|
|
@@ -1157,14 +1148,13 @@ class InboundTransfersModel {
|
|
|
1157
1148
|
}
|
|
1158
1149
|
});
|
|
1159
1150
|
});
|
|
1160
|
-
|
|
1161
|
-
if (!res) {
|
|
1162
|
-
this._logger.error(`putTransfersNotification failed after ${operation.attempts()} attempts`);
|
|
1163
|
-
}
|
|
1164
1151
|
} else {
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1152
|
+
try {
|
|
1153
|
+
res = await this._backendRequests.putTransfersNotification(this.data, transferId);
|
|
1154
|
+
const cacheKey = `patchNotificationSent_${transferId}`;
|
|
1155
|
+
await this._cache.set(cacheKey, true, 60);
|
|
1156
|
+
} catch (err) {
|
|
1157
|
+
this._logger.error('putTransfersNotification failed', err);
|
|
1168
1158
|
}
|
|
1169
1159
|
}
|
|
1170
1160
|
return res;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.58",
|
|
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/",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@mojaloop/api-snippets": "18.1.1",
|
|
45
|
-
"@mojaloop/central-services-shared": "18.33.
|
|
45
|
+
"@mojaloop/central-services-shared": "18.33.2",
|
|
46
46
|
"@mojaloop/logging-bc-client-lib": "0.5.8",
|
|
47
47
|
"@mojaloop/logging-bc-public-types-lib": "0.5.6",
|
|
48
48
|
"@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-domain-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.58",
|
|
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.
|
|
3
|
+
"version": "0.4.0-snapshot.58",
|
|
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",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@mojaloop/api-snippets": "18.1.1",
|
|
33
|
-
"@mojaloop/central-services-shared": "18.33.
|
|
33
|
+
"@mojaloop/central-services-shared": "18.33.2",
|
|
34
34
|
"@mojaloop/logging-bc-public-types-lib": "0.5.6",
|
|
35
35
|
"@mojaloop/platform-shared-lib-messaging-types-lib": "0.7.3",
|
|
36
36
|
"@mojaloop/platform-shared-lib-nodejs-kafka-client-lib": "0.5.18",
|
package/package.json
CHANGED