@mojaloop/sdk-scheme-adapter 24.11.0-snapshot.5 → 24.11.0
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/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
# Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
|
|
2
|
+
## [24.11.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.10.11...v24.11.0) (2025-09-18)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **csi-1807:** improve transfer status delivery effort ([#614](https://github.com/mojaloop/sdk-scheme-adapter/issues/614)) ([65c9d1a](https://github.com/mojaloop/sdk-scheme-adapter/commit/65c9d1a5835af0e35b1c0bbe06990f7e26bc4b35))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Chore
|
|
11
|
+
|
|
12
|
+
* **sbom:** update sbom [skip ci] ([bdb946f](https://github.com/mojaloop/sdk-scheme-adapter/commit/bdb946f94d330b8f1d0f7f2a13b8962c4b410b11))
|
|
13
|
+
|
|
2
14
|
### [24.10.11](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.10.10...v24.10.11) (2025-09-15)
|
|
3
15
|
|
|
4
16
|
|
|
@@ -325,7 +325,6 @@ describe('Inbound API handlers transforming incoming ISO20022 message bodies', (
|
|
|
325
325
|
expect(transferRequestSpy.mock.calls[0][0]).not.toEqual(isoBodies.patchTransfersRequest);
|
|
326
326
|
expect(transferRequestSpy.mock.calls[0][0].transferState).toBe('COMMITTED');
|
|
327
327
|
expect(mockContext.response.status).toBe(200);
|
|
328
|
-
console.log('Response body:', mockContext.response);
|
|
329
328
|
});
|
|
330
329
|
});
|
|
331
330
|
|
|
@@ -1036,7 +1036,7 @@ describe('inboundModel', () => {
|
|
|
1036
1036
|
});
|
|
1037
1037
|
|
|
1038
1038
|
test('does not retry notification to fsp backend if disabled', async () => {
|
|
1039
|
-
const mockFn = jest.fn().
|
|
1039
|
+
const mockFn = jest.fn().mockRejectedValue(new Error('fail'));
|
|
1040
1040
|
BackendRequests.__putTransfersNotification = mockFn;
|
|
1041
1041
|
|
|
1042
1042
|
const notif = JSON.parse(JSON.stringify(notificationToPayee));
|
|
@@ -1202,68 +1202,6 @@ describe('inboundModel', () => {
|
|
|
1202
1202
|
await expect(model.sendNotificationToPayee(notif.data, 'some-transfer-id')).resolves.toBeUndefined();
|
|
1203
1203
|
});
|
|
1204
1204
|
|
|
1205
|
-
test('retries notification to backend on failure for sendFxPutNotificationToBackend if enabled', async () => {
|
|
1206
|
-
// Simulate failure for first 2 attempts, then success
|
|
1207
|
-
const mockFn = jest.fn()
|
|
1208
|
-
.mockRejectedValueOnce(new Error('fail1'))
|
|
1209
|
-
.mockRejectedValueOnce(new Error('fail2'))
|
|
1210
|
-
.mockResolvedValue({ status: 200 });
|
|
1211
|
-
BackendRequests.__putFxTransfersNotification = mockFn;
|
|
1212
|
-
|
|
1213
|
-
const notif = JSON.parse(JSON.stringify(fxNotificationToBackend));
|
|
1214
|
-
const model = new Model({
|
|
1215
|
-
...config,
|
|
1216
|
-
cache,
|
|
1217
|
-
logger,
|
|
1218
|
-
backendRequestRetry: {
|
|
1219
|
-
enabled: true,
|
|
1220
|
-
maxRetries: 3,
|
|
1221
|
-
retryDelayMs: 10,
|
|
1222
|
-
maxRetryDelayMs: 20,
|
|
1223
|
-
backoffFactor: 1
|
|
1224
|
-
}
|
|
1225
|
-
});
|
|
1226
|
-
model.saveFxState = jest.fn().mockReturnValue(Promise.resolve({}));
|
|
1227
|
-
|
|
1228
|
-
await model.sendFxPutNotificationToBackend(notif.data, conversionId);
|
|
1229
|
-
expect(BackendRequests.__putFxTransfersNotification).toHaveBeenCalledTimes(3);
|
|
1230
|
-
});
|
|
1231
|
-
|
|
1232
|
-
test('does not retry notification to backend for sendFxPutNotificationToBackend if disabled', async () => {
|
|
1233
|
-
const mockFn = jest.fn().mockResolvedValue({ status: 200 });
|
|
1234
|
-
BackendRequests.__putFxTransfersNotification = mockFn;
|
|
1235
|
-
|
|
1236
|
-
const notif = JSON.parse(JSON.stringify(fxNotificationToBackend));
|
|
1237
|
-
const model = new Model({
|
|
1238
|
-
...config,
|
|
1239
|
-
cache,
|
|
1240
|
-
logger,
|
|
1241
|
-
backendRequestRetry: {
|
|
1242
|
-
enabled: false
|
|
1243
|
-
}
|
|
1244
|
-
});
|
|
1245
|
-
model.saveFxState = jest.fn().mockReturnValue(Promise.resolve({}));
|
|
1246
|
-
|
|
1247
|
-
await model.sendFxPutNotificationToBackend(notif.data, conversionId);
|
|
1248
|
-
expect(BackendRequests.__putFxTransfersNotification).toHaveBeenCalledTimes(1);
|
|
1249
|
-
});
|
|
1250
|
-
|
|
1251
|
-
test('sendFxPutNotificationToBackend handles error and still saves state', async () => {
|
|
1252
|
-
BackendRequests.__putFxTransfersNotification = jest.fn().mockRejectedValue(new Error('fail'));
|
|
1253
|
-
const notif = JSON.parse(JSON.stringify(fxNotificationToBackend));
|
|
1254
|
-
const model = new Model({
|
|
1255
|
-
...config,
|
|
1256
|
-
cache,
|
|
1257
|
-
logger,
|
|
1258
|
-
backendRequestRetry: {
|
|
1259
|
-
enabled: false
|
|
1260
|
-
}
|
|
1261
|
-
});
|
|
1262
|
-
const saveFxStateSpy = jest.spyOn(model, 'saveFxState').mockResolvedValue({});
|
|
1263
|
-
await expect(model.sendFxPutNotificationToBackend(notif.data, conversionId)).resolves.toBeUndefined();
|
|
1264
|
-
expect(saveFxStateSpy).toHaveBeenCalled();
|
|
1265
|
-
});
|
|
1266
|
-
|
|
1267
1205
|
test('sendNotificationToPayee handles error and still returns', async () => {
|
|
1268
1206
|
BackendRequests.__putTransfersNotification = jest.fn().mockRejectedValue(new Error('fail'));
|
|
1269
1207
|
const notif = JSON.parse(JSON.stringify(notificationToPayee));
|
package/package.json
CHANGED